September 2022
This release contains breaking changes:
Api: RemoveTypesuffixTypeSpec: RenamePagetoCollectionWithNextLinkApi:Enum.memberschange typed fromEnumMember[]toMap<string, EnumMember>TypeSpecApi: Deprecation of@consumes@producesdecorators
[API] Type suffix removed from most Types
Section titled “[API] Type suffix removed from most Types”The following types have been renamed in the compiler API:
ModelType->ModelModelTypeProperty->ModelPropertyInterfaceType->InterfaceEnumType->EnumEnumMemberType->EnumMemberTemplateParameterType->TemplateParameterNamespaceType->NamespaceOperationType->OperationStringLiteralType->StringLiteralNumericLiteralType->NumericLiteralBooleanLiteralType->BooleanLiteralTupleType->TupleUnionType->UnionUnionTypeVariant->UnionVariantProjectionType->Projection
Update uses of the type names on the left with the type names on the right. The old names can still be used but they are deprecated and may be removed from a future release.
[TYPESPEC] Rename Page to CollectionWithNextLink
Section titled “[TYPESPEC] Rename Page to CollectionWithNextLink”In library @typespec/rest in TypeSpec.Rest.Resources namespace the Page model was renamed to CollectionWithNextLink.
This resolve an issue with Page being to generic of a name for this very opinionated model.
Before
op test(): Page<MyResource>;Rename to
op test(): CollectionWithNextLink<MyResource>;[Api] Enum.members change to Map #953
Section titled “[Api] Enum.members change to Map #953”Changed the type of the members property of Enum from EnumMember[] => Map<string, EnumMember>
members: EnumMember[];members: Map<string, EnumMember>[TypeSpec] [Api] Deprecation: @consumes @produces
Section titled “[TypeSpec] [Api] Deprecation: @consumes @produces”Consumption of the data set by decorators was already removed in a previous release. Using them was a no-op.
The following are deprecated and will be removed in next release.
@consumes@producesgetConsumesgetProduces
Alternative is to use a @header contentType: <contentType> property on the operation parameters or return type