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

827 Коммитов

Автор SHA1 Сообщение Дата
David Wilson 3243f82140 Add `friendlyName` decorator to customize model names for emitters 2022-02-01 04:25:52 -08:00
Timothee Guerin ade95b18a6
Also configure code coverage upload in CI (#211) 2022-01-31 09:32:10 -08:00
Timothee Guerin 47a7851d9e
Plug in code coverage collection into tests and upload to ADO (#208) 2022-01-28 17:44:56 +00:00
Mike Kistler a18d6258d4 Fix status code validation and other minor cleanup 2022-01-28 07:19:04 -08:00
Nick Guerrera c9c7e11583
Add missing package to tsconfig.json for watch build (#204) 2022-01-26 14:29:16 -06:00
Timothee Guerin 5a637e76f4
Feature: Validate operation have a unique verb&path combination (#196) 2022-01-26 19:24:01 +00:00
Timothee Guerin a5807a561f
Validate duplicate @route decorator (#203) 2022-01-26 11:14:11 -08:00
Timothee Guerin 54e196bcd9
Add validation for http verb decorators (#201) 2022-01-26 11:06:06 -08:00
David Wilson ff30cf6b33 Default `@action` operations to POST, don't override explicit verb 2022-01-26 15:54:07 +02:00
David Wilson 9321b3ebfa Move $key, $parentResource, and $copyResourceKeyParameters 2022-01-26 15:54:07 +02:00
David Wilson 80417fe61f `list` decorator should ignore TemplateParameters 2022-01-26 15:54:07 +02:00
David Wilson b068aee9e8 Add basic format capabilities to `@doc` decorator 2022-01-26 15:54:07 +02:00
Timothee Guerin 8f18ec78d1
@doc decorator validate argument is string (#198) 2022-01-25 14:48:45 -08:00
Allen Zhang 37c927f136
Adding back @format decorator to core and openapi3 (#195)
* Adding back @format decorator to core and openapi3

* updating samples

* Update change log
2022-01-25 09:42:09 -08:00
Timothee Guerin 1d3eed6f2a
Fix: invalid use of templates show correct location (#185) 2022-01-24 15:49:56 -08:00
Timothee Guerin 5c1dd0296f
Improvements to the http operation parameter validation(Duplicate body, duplicate types on params) (#167) 2022-01-24 15:48:35 -08:00
Timothee Guerin 65a5918bf4
Basic e2e tests (#163) 2022-01-24 15:48:20 -08:00
Timothee Guerin bf956d666e
Fix issue with casing in cadl path on case insensitive fs (#192) 2022-01-24 12:28:07 -08:00
Nick Guerrera b86f709cb1
Fix path normalization mismatch issue in language server (#190) 2022-01-21 20:41:40 +00:00
Mike Kistler 070dd347fc Expose response template in Http library and refactor 2022-01-20 21:34:21 -08:00
Mike Kistler ffa4c71e3e Support union values for status-code and content-type in responses 2022-01-20 21:34:21 -08:00
Timothee Guerin 02ce4094b2
Fix: Unterminated multi-line comment error when ending with multi-line comment (#187) 2022-01-20 12:03:01 -08:00
Timothee Guerin 41d8d4bc3b
Add @head decorator (#184) 2022-01-19 10:20:51 -08:00
Timothee Guerin 9a21766601
Emit diagnostic instead of exception for duplicate @key (#186) 2022-01-19 10:20:43 -08:00
Mike Kistler 06f62f6103 Refactor and improve openapi3 return type tests 2022-01-18 12:32:54 -08:00
Timothee Guerin 29fd74b85c
Remove leftover console.log (#174) 2022-01-18 10:41:03 -08:00
Timothee Guerin 5a0383c287
Add directory manipulation to CompilerHost & path utils (#157) 2022-01-14 16:22:30 -08:00
Timothee Guerin 8be380db0d
Samples: Body complex without inheritance (#49) 2022-01-14 16:21:55 -08:00
Allen Zhang a216108b67
[Core] Rename format to pattern (1/2) (#173)
* Rename format to pattern

* Update package change log
2022-01-14 12:07:32 -08:00
Timothee Guerin 0ae516d259
Formatter: Separate Enum members with decorator (#172) 2022-01-14 11:44:40 -08:00
Timothee Guerin 1cda205294
Fix nullable arrays in openapi3 emitter (#166) 2022-01-13 14:00:47 -08:00
Nick Guerrera 806c1e27c4
Remove support for "outerfaces" (#164)
Joking in the title. There was no outerface feature, but the scanner would
scan `outerface` as `interface`! LOL!

JavaScript truncates bitwise integer math to 32 bits and that caused our
actual limit in the keyword scanning algorithm that used 5 bits per letter
to be 6 characters instead of the 10 we thought we had in the "safe" integer
range. The fix is to use equivalent, but non-bitwise arithmetic.

Perf testing on my machine shows this is still faster than not having the
optimization at all by 4 or 5% when scanning petstore.cadl thousands of
times, but a little slower than the (broken) bitwise version. This isn't
likely to be noticeable in a full compile, but could be useful if we ever
need to quickly scan for something and skip most of the tokens.
2022-01-12 14:59:12 -06:00
Timothee Guerin 43ee29c7a5
Make syntax tree readonly & remove mutator (#141) 2022-01-11 12:24:20 -08:00
Mike Kistler a2cb1802b2 Add statusCode decorator for http status code 2022-01-10 10:16:22 -08:00
Mike Kistler a1c23863ac Add doc for discriminator decorator (and fix a few typos) 2022-01-09 06:15:58 -08:00
Mike Kistler 345ae2bd09 Add a sample for polymorphic model support 2022-01-05 10:56:19 -08:00
David Wilson 9fe481555a
Add interfaces for singleton and extension resources (#121) 2022-01-05 09:43:11 -08:00
Timothee Guerin a6831d17d8
Fix binary request & response openapi (#125) 2022-01-05 09:08:43 -08:00
Mike Kistler 5713554d3b Openapi3 support for discriminated unions 2022-01-04 13:19:23 -08:00
Timothee Guerin 20147157c7
Body string sample (#148) 2022-01-04 12:02:40 -08:00
Timothee Guerin 05a9eb21f7
Try changing dependencies to peerDependencies (#65) 2022-01-04 11:00:08 -08:00
Mike Kistler 76cbed6958 Add support for discriminator decorator 2021-12-17 10:57:48 -06:00
Nick Guerrera 5c7d1148e3
Move change to correct version in changelog (#147) 2021-12-16 11:58:09 -06:00
Mike Kistler ec33166d17 Minor fix to cadl-for-openapi-dev doc 2021-12-16 10:16:03 -06:00
Mike Kistler d5131d6204 Support nullable in openapi3 emitter 2021-12-16 10:10:12 -06:00
JianyeXi 6155dacb18
Prepare cadl publish (#144)
Co-authored-by: jianye xi <jianyxi@microsoft.com>
2021-12-16 10:01:57 -06:00
Mike Kistler d026057ee6
Add findChildModels and getProperty utility functions (#129) 2021-12-16 09:40:21 -06:00
Timothee Guerin 5e002c7cc0
Fix additional circular ref issues(Alias, template) (#140) 2021-12-15 10:54:42 -08:00
Nick Guerrera 98e021d415
Add issue link (#132) 2021-12-15 12:02:57 -06:00
Nick Guerrera 6c5e9866fc
camelCase operations (#142) 2021-12-15 11:58:32 -06:00