Skip to main content
Version: Next 🚧

Release Notes September 2022 (2022-09-07)

This release contains breaking changes:

  • Api: Remove Type suffix
  • TypeSpec: Rename Page to CollectionWithNextLink
  • Api: Enum.members change typed from EnumMember[] to Map<string, EnumMember>
  • TypeSpec Api: Deprecation of @consumes @produces decorators

[API] Type suffix removed from most Types

The following types have been renamed in the compiler API:

  • ModelType -> Model
  • ModelTypeProperty -> ModelProperty
  • InterfaceType -> Interface
  • EnumType -> Enum
  • EnumMemberType -> EnumMember
  • TemplateParameterType -> TemplateParameter
  • NamespaceType -> Namespace
  • OperationType -> Operation
  • StringLiteralType -> StringLiteral
  • NumericLiteralType -> NumericLiteral
  • BooleanLiteralType -> BooleanLiteral
  • TupleType -> Tuple
  • UnionType -> Union
  • UnionTypeVariant -> UnionVariant
  • ProjectionType -> 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.

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

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

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
  • @produces
  • getConsumes
  • getProduces

Alternative is to use a @header contentType: <contentType> property on the operation parameters or return type