October 2023
New Features
@typespec/compiler New Features
- The nevertype is now assignable to all types.
- Allow constraint decorators (e.g. @minValue,@maxValue,@maxLength, etc.) to be applied to nullable types.
- Add support for @returnsand@errorsdoc comment tags.- @returns(or- @returnsDocdecorator) can be used to describe the success return types of an operation.
- @errors(or- @errorsDocdecorator) can be used to describe the error return types of an operation.
 
- Skip emit of deprecateddiagnostic for a type reference that is used in a deprecated declaration statement.
- Improve website performance by removing decoratorsexport and importing decorators individually.
@typespec/http New Features
- Add support for @returnsand@errorsdoc comment tags.
- Add support for status code ranges for http responses. Change to API Http responses can now also return a HttpStatusCodeRangeobject for their status codes.
- Emit error diagnostic when multiple properties on a response model have the @statusCodedecorator.
@typespec/json-schema New Features
- Disable folding of serialized yaml if line is above 80 characters.
@typespec/openapi New Features
- Remove @typespec/restas apeerDependency.
- Support Http Status Code ranges.
- Breaking Change Changed namespace from OpenAPItoTypeSpec.OpenAPI.
@typespec/openapi3 New Features
- Remove @typespec/restas apeerDependency.
- Add support for constraints on union types.
- Add support for @returnsand@errorsdoc comment tags.
- Add support for http status code ranges.
@typespec/protobuf New features
- Added support for emitting documentation comments in protobuf specifications.
@typespec/rest New features
- Remove peer dependency on @typespec/httplibrary.
Bug Fixes
@typespec/compiler Bug Fixes
- Fix: Correct handling of hyphens in doc comments.
- Fix: Colorization of line comments extending into the next line.
- Fix: Crash when using parentheses in directives.
- Fix: Allow assigning negative and 0 values to float64types.
- Fix: Return non-zero format code when tsp formatting fails.
- Fix: Correct formatting of anonymous unions to exclude leading ’:’ character.
- Fix: Unions and Enum members are now formatted following the same rules as model properties. An extra line will be added between members if the member is annotated with a decorator, directive or doc comment.
- Fix: Correct formatting of comments between a directive or doc and its node.
- Fix: tsp initwas not creating thetspconfig.yamlfile for templates that specified it.
- Fix: tsp initwill create a placeholdertspconfig.yamlfile for templates that don’t specify an explicit one.
- Fix: tsp initwas ignoring thefilesspecified in an init template.
- Fix: Language Server wasn’t loading the tspconfig.yamlcorrectly resulting in some options being dropped, like the linter configuration.
- Fix: Allow nullto be assigned as a default value.
- Fix: Using TypeSpec.Xyznamespace shouldn’t require theTypeSpec Prefix.
@typespec/openapi3 Bug Fixes
- Fix: Correctly generate discriminated union mapping property with multiple visibilities.
- 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, ignore the format, and emit a warning diagnostic.
- Fix: Allow using null as a default value.
- Fix: Allow use of @oneOfon model properties.
- Fix: Correct representation of CSV format.
- Fix: Remove incorrect statusCodefield for operations with shared routes.
@typespec/rest Bug Fixes
- Fix: @keycan now appear on the base model of a resource.
@typespec/versioning Bug Fixes
- Ensure that use of @renamedFromdoes not result in duplicate properties on a model.
Breaking Changes
@typespec/http Breaking Changes
- Http responses can now also return a HttpStatusCodeRangeobject for their status codes. Emitters will need to handle the additional status code content when processing status codes.
- Emit error diagnostic when multiple properties on a response model have the @statusCodedecorator.
@typespec/openapi Breaking Changes
- Changed namespace from OpenAPItoTypeSpec.OpenAPI.