title |
---|
April 2023 |
:::danger This release contains breaking changes :::
- Emit diagnostic when ambiguous symbol exists between global and usings
- Add support for referencing metatypes ModelProperty
::type
and Operation::returnType
and::parameters
- Relax constraint on derived type overrides
- Prevent use of augment decorators on instantiated templates.
- Allow projectedNames helpers to work with previous projections
- Add helper
interpolatePath
for emitter to do additional interpolation on config properties - Api: Update
getTypeName
to omit standard library namespace - Allow overloads in interfaces to work under projection
- Add pre-projection support
- Provide access to extended interfaces in type graph
- Document member ordering and fix projection rename reordering
- Support shared routes
- Update to use new
interpolatePath
logic to resolve theoutput-file
- Add migrate script for zonedDateTime
- Add migration script for
@header
and@query
format required
- Fix: emitter framework will now visit scalar declarations
- Fix: Alias unknown ref crash
- Fix: Empty model expression assignable to array
- Fix:
tsp code uninstall
not finding extension to uninstall - Fix: Issue where template parameter type check wouldn't work if constraint is exact same type as next validation
- Fix: Issue where
@action("")
was treated the same as@action
. Now this emits an error.
- Fix: Issue with using version as a template parameter across different namespaces. Includes a significant change in the versioning library internals.
- Fix:Use pre-projections to fix issues with versioned resources.
- Fix: Highlighting of TypeSpec code blocks in markdown.
- Removed
@versionedDependency
decorator. Use@useDependency
instead. - Removed
getRenamedFromVersion
. UsegetRenamedFromVersions
instead. - Removed
getRenamedFromOldName
. UsegetNameAtVersion
instead. - Removed
getAddedOn
,addedAfter
,getRemovedOn
andremovedOnOrBefore
. UseexistsAtVersion
instead. - Removed
renamedAfter
. UsehasDifferentNameAtVersion
instead.
To disambiguate important time concepts and encourage best practice behavior in representing date-time types we
removed zonedDateTime
which was being used to represent a time with offset, and replaced it with two new types that are more precisely defined:
utcDateTime
which represents a precise instant in time. This type should be used to represent time values given in coordinated universal time (UTC) and unix timestamps. This is the preferred mechanism for capturing dateTime in most service specifications.offsetDateTime
which represents a time with offset. Note that while this time contains an offset from UTC, it does not contain any additional time zone information.
model MyModel {
createdAt: zonedDateTime;
}
model MyModel {
createdAt: utcDateTime;
}
The (experimental) migration tool will automatically migrate instances of zonedDateTime
to utcDateTime
. To perform all migrations in a TypeSpec or Cadl specification package, execute:
npx @typespec/migrate
If you would like to execute from a different folder or don't have a package.json that indicates compiler package versions, please see command line options:
npx @typespec/migrate --help
@header
and @query
no longer default the format
to csv
and multi
respectively. A value must now be provided when the type is an array. The migration tool can also be used to make this change.
Rules from another library can no longer be enabled on a LibraryLinter.