July 2022
This release contains breaking changes
- Emitter options normalized to use kebab-case instead of camelCase.
@serviceHost
decorator replaced by@server
decorator- Versioning decorators now use enumerated values instead of strings
Emitter options
This release brings a stricter option definition for emitters and requires usage of those options to be specified with the fully qualified name to prevent conflicts.
All options have also been renamed to match kebab-case
naming.
The options can also be specified via the tspconfig.yaml
file.
Migrating Command Line Scripts
If you had for example --option operationPollingLocation=tenant
-
Use
tspconfig.yaml
project file RecommendedIf you donโt have that file yet, create it next to
package.json
, this file can be used to configure the emitters. -
Via the
--option
flagYou can still use the
--option
flag but youโll need to specify the fully qualified name of the option.
Renamed Emitter Options
Before | Now |
---|---|
@typespec/openapi3 | |
outputFile | output-file |
@serviceHost
decorator replaced with @server
decorator
The @serviceHost
decorator that decorated the root namespace was used to specify the domain name of the base service endpoint. This functionality has been replaced by the @server
decorator, which allows specifying full and parametrized Uris for the service endpoint, as described here
Before
After
Versioning uses enums instead of strings
Versions must now be specified using string-valued enumerations, and each of the versioning decorators must reference an enum value rather than using the version string directly.