Граф коммитов

247 Коммитов

Автор SHA1 Сообщение Дата
Timothee Guerin b3ea529128
Format CSharp files: add `dotnet format` to `rush format` (#490) 2022-04-29 09:46:23 -07:00
Timothee Guerin 6504701fee
Feature: `--warn-as-error` flag to make all warnings be errors (#488) 2022-04-28 14:05:58 -07:00
Timothee Guerin 20b7e4a1e7
Bump ecmmarkup version to get rid of deprecated packages (#487) 2022-04-28 08:08:26 -07:00
Timothee Guerin 30b9b5cc1a
Refactor: rename `mixes` to `extends` for interfaces (#484) 2022-04-27 15:00:57 -07:00
Timothee Guerin 824e9f4666
Fix compiler dogfood on windows (#480) 2022-04-27 08:24:38 -07:00
Nick Guerrera 47ffbe9d58
Color decorators differently than operations (#477) 2022-04-25 22:35:47 +00:00
Timothee Guerin ddcf3d0ebe
Fix: Spreading versioned models (#441) 2022-04-25 14:44:59 -07:00
Nick Guerrera ad191775f4
Fix build issues (#474)
1. Fix `rush dogfood`
2. Fix `watch-tmlanguage`
3. Fix regen-samples running in parallel
4. Be consistent about utf-8 with readFile(Sync)
2022-04-25 13:32:12 -05:00
Timothee Guerin 669f2c9ff8
Publish preview version of all packages with changes on every main commit (#472) 2022-04-25 10:19:02 -07:00
Timothee Guerin 898423ec25
Add PR number and update style if playground is buillt in PR (#470) 2022-04-21 13:55:44 -07:00
Nick Guerrera dfb39368a4
Encode OpenAPI refs and remove concept of "ref-safe" names (#463)
* Correctly URI-encode OpenAPI refs when necessary. Delete broken code that
attempted to address this with name mangling.

* Remove all regexes from how we decide what to inline and what to ref, and
how to name things. The reasoning is now done on the type objects, and not
on their serialized names.

* The current choices are preserved modulo obvious bugs, but I will open an
issue to revisit some of them. It will be easier to change after this
refactoring.

* Centralize the logic in the shared openapi lib for reuse by cadl-autorest.

* Fix issues with the regex-based stripping of Cadl and service namespaces
by replacing that with a namespace filter callback on Checker.getTypeName.

* Defend against parameter key and type name collisions with diagnostics.
2022-04-21 14:38:47 -05:00
Timothee Guerin d2fbbb717f
Use react for playground (#457) 2022-04-21 08:55:04 -07:00
Timothee Guerin e966efd30e
New `@cadl-lang/internal-build-utils` package for build helpers shared across pkgs (#465) 2022-04-21 08:16:10 -07:00
Timothee Guerin 393dee19f1
Formatter: remove quotes of property names when not needed (#460) 2022-04-19 13:02:54 -07:00
Timothee Guerin 7f0228656d
Fix Duplicate description in parameters (#440) 2022-04-18 13:40:54 -07:00
Nick Guerrera a31c2ca4ab
Implement find references and rename, and improve goto definition (#450)
Add support for find all references and rename to the language server and
playground.

Make goto definition work on namespaces, usings, and decorators.
2022-04-18 15:08:01 -05:00
Timothee Guerin a9691a599b
Add manifest generation and loading to compiler (#443) 2022-04-18 19:39:02 +00:00
David Wilson e142a50fee Reorder tags and `x-*` extensions in emitted operations 2022-04-18 09:32:59 +03:00
David Wilson 403fb31cd4 Add OmitProperties type and @withoutOmittedProperties decorator 2022-04-14 20:50:05 +03:00
Timothee Guerin 8648514cee
Validate Rest resource interface `TError` is an error model (#444) 2022-04-14 10:02:44 -07:00
Timothee Guerin dd405f9556
Add debug level logging for library imports (#378) 2022-04-13 09:07:17 -07:00
Timothee Guerin 2c033a2f35
Tweak versioning for linting (#439) 2022-04-13 08:06:43 -07:00
Timothee Guerin dd09f01dc9
Add a code preview for diagnostics and coloring for diagnostics (#436) 2022-04-12 12:43:42 -07:00
Timothee Guerin 19e203dcca
Add ability to ignore pattern when formatting (#435) 2022-04-11 20:29:06 +00:00
Timothee Guerin 57bb55be38
Missing formatter syntax (#432) 2022-04-11 20:02:56 +00:00
Timothee Guerin f4a234e388
Fix: template args issues (#430) 2022-04-11 19:48:08 +00:00
Nick Guerrera b4d8ef5a2b
Remove node 14 support (#433) 2022-04-11 14:30:22 -05:00
Timothee Guerin 46b4ced7ae
Update dependencies and regen thirdpartynotice (#434) 2022-04-11 15:56:39 +00:00
Timothee Guerin 3f36964323
Upgrade to typescript 4.6 (#431) 2022-04-11 07:59:45 -07:00
Timothee Guerin 39b5d0e5e2
Fix: Instantiated template types only used in `is` or `spread` shouldn't be included as derived types in OpenAPI3 (#429) 2022-04-08 12:51:16 -07:00
Nick Guerrera b11ae0cfd2
Add VS Code command to restart language server (#427) 2022-04-08 17:30:07 +00:00
Timothee Guerin 6095a40107
Don't do default type checking when property type is errorType (#426) 2022-04-08 10:15:41 -07:00
Timothee Guerin d517a53a76
Fix Empty operation response with children resulting in 204 (#367) 2022-04-08 16:46:44 +00:00
Timothee Guerin e34fae3a3f
Fix issue with not excluding derived template models in OpenAPI3 emitter (#425) 2022-04-08 09:36:24 -07:00
Timothee Guerin 7313b6fe2e
Add children relationship in ModelType (#415) 2022-04-07 21:31:02 +00:00
Timothee Guerin 2d0ea12305
Add ability to self reference library in imports and emitters config (#419) 2022-04-07 12:44:35 -07:00
Timothee Guerin 1312ef7672
Basic E2E ui test for the playground (#412) 2022-04-06 14:19:26 -07:00
Timothee Guerin 3049b77309
Add workaround for npx bug doubling `\` in command args (#409) 2022-04-05 20:57:30 +00:00
Nick Guerrera 3bf082840a
Prompt on cadl vs install if multiple versions of VS are installed (#407) 2022-04-05 19:00:57 +00:00
Timothee Guerin 5063fb1c78
Give an helpful error when code is missing in path (#406) 2022-04-05 17:16:03 +00:00
Nick Guerrera 7ea129e5ef
Don't complete decorator names in type reference position (#404) 2022-04-04 16:02:23 -05:00
Timothee Guerin 1591e37ae4
Move openapi3 decorators in namespace `OpenAPI` (#373) 2022-04-04 13:42:26 -07:00
David Wilson eb2236b405 Add RouteOptions and AutoRouteOptions to customize generated routes
This change adds a new `RouteOptions` parameter to `getAllRoutes` and
`getRoutesForContainer` which (for now) exposes an `AutoRouteOptions` interface
for customizing how route parameters are generated for `autoRoute` operations.

This enables emitters to customize route generation by allowing route
parameters (the `{param}` syntax) to be renamed or replaced with static
values based on library-specific metadata that is attached to the parameter or
operation.

The caller can also decide whether certain route parameters should
appear in the final set of operation parameters.
2022-04-04 09:38:00 -07:00
Timothee Guerin 0e3a298feb
Add symbol descriptions and setup eslint rule (#403) 2022-04-04 09:17:07 -07:00
Timothee Guerin 94f485c67e
Fix: Using versioned lib validation false positive with interfaces and unions (#400) 2022-04-01 14:43:53 -07:00
Nick Guerrera d635c8535f
Prepare cadl publish (#391) 2022-03-31 12:27:52 -05:00
Timothee Guerin 25c9d20f99
Fix formatting of comment between decorator and property (#388) 2022-03-31 09:15:10 -07:00
Timothee Guerin 5d057edf60
Fix old Azure/adl links (#385) 2022-03-31 08:26:21 -07:00
Timothee Guerin bc34dadb16
Fix: Playground importing file not mocked (#386) 2022-03-30 15:52:04 -07:00
Timothee Guerin d8b0250b28
Fix: resolve location of diagnostic target in js source file (#383) 2022-03-30 13:02:37 -07:00