Releases: Azure/typespec-azure
Releases · Azure/typespec-azure
@azure-tools/[email protected]
@azure-tools/[email protected]
Bump dependencies
- #1534 Bump dependencies
@azure-tools/[email protected]
Bug Fixes
- #1592 change example mapping logic to allow operation id with/without renaming
- #1589 In
0.46.1
we changed the type ofresponses
inSdkHttpOperation
fromMap<number | HttpRange, SdkHttpResponse>
toSdkHttpResponse[]
,exceptions
inSdkHttpOperation
fromMap<number | HttpRange | "*", SdkHttpResponse>
toSdkHttpResponse[]
,
and added astatusCodes
property toSdkHttpResponse
. But thestatusCodes
is defined asnumber | HttpRange | "*"
, which loses the information that the responses inresponses
property could never have a*
as its statusCodes.
This PR adds a new typeSdkHttpErrorResponse
with thestatusCodes
ofnumber | HttpRange | "*"
, and changes the type ofstatusCodes
inSdkHttpResponse
tonumber | HttpRange
to be precise.
@azure-tools/[email protected]
Bug Fixes
- #1512
x-ms-skip-url-encoding
should be replaced withallowReserved
@azure-tools/[email protected]
Bug Fixes
- #1491 Fix naming logic for anonymous model wrapped by
HttpPart
- #1542 Fix
subscriptionId
for ARM SDK - #1558 Handle orphan types in nested namespaces
- #1554 Fix
onClient
setting for client initialization parameters applied to an interface
Breaking Changes
- #1540
- The type of
responses
andexceptions
inSdkHttpOperation
changed fromMap<number | HttpStatusCodeRange | "*", SdkHttpResponse>
toSdkHttpResponse[]
. - The type of
responses
inSdkHttpOperationExample
changed fromMap<number, SdkHttpResponseExampleValue>
toSdkHttpResponseExampleValue[]
. SdkHttpResponse
adds a new propertystatusCodes
to store its corresponding status code or status code range.
Migration hints:
The type changed from map to array, and the key of the map is moved as a new property of the value type. For example, for code like this:
you could do the same in this way:for (const [statusCodes, response] of operation.responses)
for (const response of operation.responses) { const statusCodes = response.statusCodes; }
- The type of
- #1463
- The kind for
unknown
renamed fromany
tounknown
. - The
values
property inSdkUnionType
renamed tovariantTypes
. - The
values
property inSdkTupleType
renamed tovalueTypes
. - The example types for parameter, response and
SdkType
has been renamed toXXXExampleValue
to emphasize that they are values instead of the example itself. - The
@format
decorator is no longer able to change the type of the property.
- The kind for
- #1539
- change
encode
inSdkBuiltInType
to optional. - no longer use the value of
kind
asencode
when there is no encode on this type.
- change
- #1541 no longer export the
SdkExampleValueBase
interface. This type should have no usage in downstream consumer's code. If there is any usage, please replace it withSdkExampleValue
.
[email protected]
@azure-tools/typespec-autorest
Bug Fixes
- #1436 Fixes bug where defining multiple services in a project resulted in each openapi output containing the same single service definition.
Features
- #1455 Respect
@clientName
for definition names(model, enums, union, etc.), enum and union member and for parameters - #1449 Add support for custom item name in
x-ms-pageable
Deprecations
-
#1368 Replace
examples-directory
withexamples-dir
which will validate an absolute path is providedCase 1: Examples are in
examples
directory next totspconfig.yaml
. In this case the option can just be removed- examples-directory: examples
- examples-directory: {project-root}/examples
Case 2: Examples are in a different directory
- examples-directory: autorest-examples + examples-dir: {project-root}/autorest-examples
- examples-directory: {project-root}/autorest-examples + examples-dir: {project-root}/autorest-examples
@azure-tools/typespec-azure-core
Features
- #1342 Replace
no-operation-id
linter rule with a more genericno-openapi
rule guarding against any use of openapi decorators
@azure-tools/typespec-azure-portal-core
No changes, version bump only.
@azure-tools/typespec-azure-resource-manager
Bug Fixes
- #1359
arm-no-record
rule should warn about any use ofRecord<X>
not just when inside resource properties
Features
- #1482 Add mobo type to TypeSpec-Azure common types
@azure-tools/typespec-client-generator-core
Bug Fixes
- #1476 Fix to add client signature
subscriptionId
for ARM SDK - #1424 do not handle example value with null for model type
- #1424 consider renaming for parameter or property
- #1431 consider renaming when mapping examples
- #1452 TCGC, make content type optional when request body is optional
- #1399 remove import of
UnionEnumVariant
- #1432 need to handle projection when finding spread original model
- #1377 Fix getLibraryName for anonymous model which is derived from template
- #1435 Don't require params introduced by
Azure.Core
with@override
- #1410 set sdk method body parameter encode with http content type
Features
- #1305 Add Namespace as target for @access decorator
- #1398 add
@clientInitialization
decorator - #1253 add parent client info to
SdkClientType
- #1253 add
listSubClients
helper func - #1379 add
doc
andsummary
to tcgc types - #1387 add default path for example detection
- #1395 do propagation when override access or usage
- #1388 use original model for spread if it is from a simple spread
- #1303 allow
@usage
to apply to namespaces
Deprecations
- #1395 deprecate
@internal
decorator andisInternal
helper function
Breaking Changes
@azure-tools/[email protected]
@azure-tools/[email protected]
No changes, version bump only.
@azure-tools/[email protected]
Bug Fixes
- #1392 Fix multipart for client customization