- #3077 Do not crash if using an unsupported intrinsic type
- #2967 Fix crash: emit
{nullable: true}when trying to emitnullin openapi3 - #3013 Fix: OpenAPI3 not marking part of bytes or something else as
format: binary - #3090 Fix: Literal unions with the same variants keep adding duplicate entries
- #3049 Fix visibility naming conflict when a model used with
extendswas used in different visibility.
- #3027 Update dependencies
- #2900 Update dependencies
- #2902 Add support for all properties of openapi
infoobject on the@infodecorator - #2950 Add
getOpenAPI3function that takes a TypeSpec program and returns the emitted OpenAPI as an object. Useful for other emitters and tools that want to work with emitted OpenAPI directly without writing it to disk. - #2933 Add a new option
safeint-strategythat can be set todouble-intto emittype: integer, format: double-intinstead oftype: integer, format: int64when using thesafeintscalar.
- 4915d5b: Fix:
requiredarray on schema wasn't using the value provided by@encodedName
- e6a045b: Allow using default values for union property types
- e6a045b: Fix: union of primitive types that gets emitted as an
enumkeeps the description
- 9726b3d: Fix issues with
nullableproperties used in a cycle being wrapped inallOfwhen not needed - 05c8597: Fix circular reference would not always inline array properties
- 8ed1d82: Add support for OpenIdConnect auth scheme
Wed, 24 Jan 2024 05:46:53 GMT
- Add support for
@encodedNamedecorator - Update dependencies
Wed, 13 Dec 2023 23:28:17 GMT
- Fix: Multipart part of type
bytes[]is now treated as multiple binary part - Fix: OpenAPI3 creating conflicting type declaration when type was used in multipart implicit body and json body
Wed, 06 Dec 2023 19:40:58 GMT
- Handle
bytesas a multipart part type correctly and producetype: string, format: binary - Added support for string template literals
- Handle: union variants as discriminator
- Migrate code to use the emitter framework
- Emitter will now emit all properties on unreferenced schemas.
Wed, 08 Nov 2023 00:07:17 GMT
- Fix: Stops emitting an error when using
@body _: voidin operation parameters and treat it as no body. - Fix issue where using shared routes would, in some cases, result in a "duplicate-header" error.
TypeScriptusetypesentry underexportsofpackage.jsoninstead of legacytypesVersionsto provide the definition files- Support
@summaryon data types which emits the JSON Schematitleproperty. - BREAKING CHANGE Dropped support for node 16, minimum node version is now 18
Wed, 11 Oct 2023 23:31:35 GMT
- Removes
@typespec/restas apeerDependency. Relates to #2391 - Add support for constraints on unions
- Add support for
@returnsand@errorsdoc comment tags. - Add support for http status code ranges
- Fix: Correctly generate discriminated union mapping property with multiple visibilities involved
- Fix: Crash when assigning a numeric default to a union
- Fix: Using format
ssvorpipesin@headerproduced an invalid OpenAPI3 schema. It will now change the type to string and ignore the format as well as logging a warning. - Fix: Use
nullas a default - Allow use of
@oneOfon model properties - Fix
OpenAPInamespace to beTypeSpec.OpenAPI. - Fix issue with CSV format representation.
- Fix issue where openAPI3 for shared routes incorrectly output a statusCode field.
- Update dependencies
- Disable folding of serialized yaml if line is above 80 characters
Tue, 19 Sep 2023 19:28:32 GMT
- Fix: Correctly generate discriminated union mapping property with multiple visibilities involved
Tue, 12 Sep 2023 21:47:11 GMT
- Fixed issue where parameters on a PATCH request marked with visibility "create" did not appear.
- Changed yaml parser from
js-yamltoyaml - Fix:
exclusiveMinimumandexclusiveMaximumproperties are booleans in openapi3 - Use
anyOfinstead ofoneOffor shared route with different request/response bodies - Fix handling of
Record<T>inmodel isandmodel extends
Tue, 08 Aug 2023 22:32:10 GMT
- Handle general encodings for utcDateTime
- Add support for
@infodecorator providing the ability to specify the additional fields from openapi info object. - Emit diagnostic for empty unions
- Fix: Apply
@minItemsand@maxItemsdecorators on model array. - Fix
@useRefdecorator serializing$refas an object. - Support collection formats: simple, form, ssv and pipes.
Tue, 11 Jul 2023 22:06:00 GMT
- Omitting
x-typespec-nameextension by default from openapi3 output. A new flaginclude-x-typespec-name: "inline-only" | "never"has been added to get previous behavior. - Update dependencies
Tue, 06 Jun 2023 22:44:16 GMT
- Support decimal and decimal128 scalar types.
- Uptake doc comment changes. Standard built-in scalar will not have the description included as they are inlined.
- Add description to emitter options
- Update decorators signature to use
{}instead ofobject - Fix: Documentation on
model is x[]was not included in schema description - Fix:
@encodeencoding doesn't override target type format - Fix: Encoding resolution for model properties and add back
unixtime - Fix: derived scalar doc ignored
- Add signature for missing decorators
- Add handling of
integer,floatandnumeric
Wed, 10 May 2023 21:24:00 GMT
- Added support for
@encodedecorator - Fix openapi3 emitter to mark request body required
- Support multiple responses for the same status code and content type.
- Fix issue where shared request bodies did not emit correctly.
- Update decorator declaration to use
Modelinstead ofobject - Update dependencies
Tue, 11 Apr 2023 18:49:17 GMT
- Support shared routes.
- Update to use new
interpolatePathlogic to resolve theoutput-file - Add tests for overloads within interfaces
- Support new datetime types
Mon, 13 Mar 2023 21:30:44 GMT
- Avoid Read suffix in schemas split by visibility.
Fri, 03 Mar 2023 19:59:17 GMT
- Support additionalProperties
- Stop treating models spread into parameters as unreferenced.
- Revert back changelog
- Use new
@typespec/httplibrary - Update package.json entrypoint to tspMain
- Rename to TypeSpec
- Update homepage link
Tue, 07 Feb 2023 21:56:17 GMT
- Convert Ref objects to ref string in OpenAPI YAML output
- Fix issue where operation parameters could not target a ModelProperty.
- Sort OpenAPI 3 output
- Don't emit extra "canonical" model when always impacted by visibility
Fri, 13 Jan 2023 00:05:26 GMT
- Emit style & explode per encoding options
- Generate recursive update schemas with optional properties for resource update operation
- Add support for emitting exclusiveMinimum and exclusiveMaximum based on the corresponding decorators
- Breaking Change Add yaml serialization for openapi output. Default has been changed to yaml. Use
file-type: jsonoroutput-file: myfile.jsonto use json
Wed, 07 Dec 2022 17:21:52 GMT
- Omit metadata properties of type
never - Internal: update to use new
getTypeNameandgetNamespaceStringhelper - Uptake change to
onEmitsignature - Breaking change using new built-in
emitter-output-diroption instead of customoutput-dir. - Add support for multiple services
- Uptake changes to compiler api to support Scalars
- Add support for renamed
urlscalar - Uptake changes to rest library api
- Emit 'deprecated' operation property in openapi3
- Internal: Update tests to change from
emitterscompiler options toemitandoptions - Fix: Respect
@headerand@queryover the wire name - Update dependencies
- Remove undocumented use of atVersion projection
Sat, 12 Nov 2022 00:14:04 GMT
- Declare decorators in cadl using
extern dec - Feature: Add support for
unknown
- Fix: @extension on a model is intrinsic types are being applied
Wed, 12 Oct 2022 21:12:35 GMT
- Use new
getDiscriminatedUnionhelper from compiler - Empty object as a response will not produce a 204 response anymore
- Implement automatic visibility transformations
- Add support for
@minItemsand@maxItemsdecorators - Add support for referencing model properties.
- Emitted openapi3 document include all types under the service namespace
- Uptake move of
@discriminatorinto compiler - Add
output-diremitter option - Add support for overloads(Using
@overloaddecorator) - Uptake changes to rest library
- Fix: Response headers are marked as required unless optional
- Fix:
Content-Typerequest header lookup is case insensitive - Exclude properties of type
neverwhen emitting model schemas
Thu, 08 Sep 2022 01:04:53 GMT
- Uptake change to enum members map type
- Use projectedName projection for
jsonto get the real over the wire properties. - Uptake changes to compiler with current projection
- Update decororator state key to allow multiple instance of library to work together.
- React to Type suffix removal
- Support more kinds of unions, fix various union bugs, and add support for @discriminator on unions
- Uptake changes to http service authentication oauth2 scopes
- Add support for
@extensionon Server variables
Thu, 11 Aug 2022 19:05:23 GMT
- Added support for default value for properties with enum type.
- Use authentication configured via
@useAuthhttp decorator - Add new emitter option
new-lineto configure emitted line endings - Uptake changes to type relations
- Support set of unannotated parameters as request body
- Inline generic instantiations without
@friendlyName - Uptake new
resolveOperationIdhelper from openapi library improving the logic - Add warning if there is no exposed routes
- Internal: Uptake new compiler helpers to work with template types
- Fix: Description being ignored on non-string primitive models
- Fix uninitialized parent namespaces in projection
- Run projections on types returned from getEffectiveType
- fix infinite recursion with self referencing model
- Remove
summaryproperty set on schemas - Make response descriptions more consistent
- Update Readme.md for new decorators.
Fri, 08 Jul 2022 23:22:57 GMT
- Emitter can take
outputFileas an option - Rename emitter options to be
kebab-case
- Inline parameters spread from anonymous model
Mon, 13 Jun 2022 23:42:28 GMT
- Uptake changes to @cadl-lang/rest libraries around accessor
- Uptake changes to decorator context
- Add support for new @server decorator used to specify api endpoints.
- Find good names where possible for anonymous models that differ from named models only by properties that are not part of the schema
- Uptake changes to versioning library using enums for version
- Upgrade to TS4.7
Fri, 06 May 2022 17:19:57 GMT
- Uptake change in compiler with children references
- Move decorators to
OpenAPInamespace - Uptake change to versioning library
- Remove node 14 support
- Fix issue not excluding template models from derived models causing crash
- Fix duplicate
descriptionin parameters - Rearrange some aspects of operation output in the OpenAPI emitter
- URI-encode refs
Thu, 31 Mar 2022 17:10:49 GMT
- Include discriminator property in base schema with a boilerplace description
- Add support for
voidtype - Moved http response interpretation to @cadl-lang/rest library.
- implement multiple response content types
- Uptake change to allow versioned dependency with unversioned service
- Fix bug with number enums that reference
0. - Use parent .model of ModelTypeProperty
- Support browser builds
Wed, 09 Mar 2022 17:42:09 GMT
- @doc and @summary will set the description and summary on extended primitive types
- Emit child models to OpenAPI when parent is emitted
- Added support for
@externalDocsdecorator - Added support for
@knownValuesdecorator - @doc on service namespace set openapi description
- Uptake change to intrinsic types
- Fix issue where a model name the same as Cadl Intrinsic type would be treated the same.
- Fix duplicate parameter type definitions in OpenAPI 3 output
Tue, 15 Feb 2022 22:35:02 GMT
- Add validation to oneOf decorator
- Add support for separate
@summaryfrom@doc
Mon, 14 Feb 2022 03:01:07 GMT
- refactor status code handling to http library
- Take change in openapi upstream library
- Update decorators to take in api change
- Bump dependency versions
Fri, 04 Feb 2022 18:00:18 GMT
- Support union values for status-code and content-type in responses
- Openapi3 support for discriminated unions
- openapi3 emitter support for @error decorator
- Configure for new emitter syntax
- Internals: switch to internal path manipulation
- Extracted decorators into own library
@cadl-lang/openapi - Uptake changes in @cadl-lang/rest library improving operation parameter handling
- Update cadl dependencies to peerDependencies
- Add support for versioned services
- Add statusCode decorator for http status code
- Adding @format decorator support for openapi3 to emit "format" for string types
- Fix Added support for nullable array
xzy[] | null - Fix issue with @body body: bytes producing
type: string, format: bytesinstead oftype: string, format: binaryfor requests and responses - Use assigned @friendlyName on model types when emitting schema definitions and refs
- Refactor and improve openapi3 return type tests
- Fix status code validation and other minor cleanup
- Support nullable in openapi3 emitter
- Renaming @format decorator to @pattern.
Thu, 16 Dec 2021 08:02:20 GMT
- Generate anyOf or oneOf schemas for Cadl unions in openapi3
- Update openapi3 emitter to consume new Cadl.Rest route generation API
Wed, 01 Dec 2021 22:56:11 GMT
- Add support for extension decorator on parameters and tests
- Add openapi3 support for Cadl safeint
- Add README
Thu, 18 Nov 2021 13:58:15 GMT
- Enable operation generation from interfaces
Thu, 11 Nov 2021 21:46:21 GMT
- Added Support for duration type
Thu, 28 Oct 2021 21:17:50 GMT
- Use strict diagnostics
- Fix crash on empty enum in openapi3 emitter
- Set shared param definitions in components.parameters
- Fix param default to be in schema
- Fix handling of decorators on parameters in openapi3
- Fix generation of openapi3 response headers
- Define response body for primitive response type
- Remove management.azure.com service host default
Fri, 15 Oct 2021 21:33:37 GMT
- Added Support for server default
Fri, 17 Sep 2021 00:49:37 GMT
- Add emitter for OpenAPI 3.0
- Remove support for multiple inheritance
- Adding changelog for openapi3 package
- Updates for cadl namespace addition
- This is a test
- Support for emitting
bytesand new number types