September 2023
New Features
@typespec/compiler New Features
- Allow library authors to precisely define the visibility of operation templates with new decorators @parameterVisibilityand@returnTypeVisibility, paired with corresponding accessor methodsgetParameterVisibilityandgetReturnTypeVisibility.
- Add coloring for documentation comments in Visual Studio and Visual Studio Code language extensions.
- Change yaml parser from js-yamltoyaml, enabling more precise validation and error reporting intspconfig.yaml
- Added validation to ensure that properties of a derived model (using extends) are compatible with the base model indexer.
- Export CompilerOptionsTypeScript type.
- Report library information when library code crashes during $onValidateexecution.
- Diagnostics reported on a node with an idproperty will highlight the id instead of the entire node. For example, if a diagnostic is reported on amodeltype, the model name will be highlighted, instead of the entire model definition.
@typespec/http New Features
- Add new helper method resolveRequestVisibilitywhich incorporates settings from new core decorators@parameterVisibilityand@returnTypeVisibility. This replaces the deprecatedgetRequestVisibilityhelper.
- Add new helper method getDefaultVisibilityForVerbwhich returns the default visibility for Http verbs.
- Add validation step to issue a warning when an operation isstatement does not include route information from the original operation container (interfaceornamespace). This helps to prevent unexpected route changes when using operation references.
- Add validation to prevent runtime errors when OAuth2Authis given invalidOAuth2Flowarguments.
@typespec/json-schema New Features
- Support decimal scalar types.
@typespec/openapi3 New Features
- Allow library authors to override default Http verb visibility in operation declarations.
@typespec/protobuf New features
- Support omit-unreachable-typesoption.
- Automatically convert empty operation parameters into a reference to google.protobuf.Emptyinstead of synthesizing an empty model.
typespec-vscode New features
- Add color definition for @paramtag in documentation comments
Bug Fixes
@typespec/compiler Bug Fixes
- Fix issue where specifying a directory using the --configcommand line option would search the parent folder hierarchy looking fortspconfig.yaml.
- Fix Stack overflow when a model property references itself.
- Fix compiler crash when using the alias of a namespace that has decorators.
- Fix compiler freeze when an invalid token appears between doc comment and type.
- Fix compiler crash when relating recursive types.
- Fix typo in format error diagnostic.
@typespec/openapi3 Bug Fixes
- Fixed issue where parameters marked with visibility βcreateβ did not appear in a PATCHrequest body.
- Fixed incorrect usage of exclusiveMinimumandexclusiveMaximumboolean properties.
- Use anyOfinstead ofoneOffor operations with shared routes and different request or response bodies.
- Fix handling of Record<T>inmodel isandmodel extendsstatements.
@typespec/versioning Bug Fixes
- Fixed validation in @typeChangedFromfor incorrect versioned references.
Deprecations
@typespec/compiler Deprecations
- The @deprecateddecorator has been marked as deprecated. Use#deprecateddirective instead.
@typespec/http Deprecations
- The getRequestVisibilityhelper function is now deprecated. UseresolveRequestVisibilityorgetDefaultVisibilityForVerbinstead.
Breaking Changes
@typespec/compiler Breaking Changes
- 
A semicolon is now required at the end of augment decorator statements. The formatter was already inserting the semicolon, if omitted. For example: @@doc(MyType.myProperty, "Documentation for myProperty");