Skip to content

Releases: Azure/typespec-azure

@azure-tools/[email protected]

10 Oct 00:13
e20b38b
Compare
Choose a tag to compare

Bump dependencies

  • #1534 Bump dependencies

Features

  • #1555 Add no-empty-model rule to ruleset

@azure-tools/[email protected]

10 Oct 00:13
e20b38b
Compare
Choose a tag to compare

Bump dependencies

  • #1534 Bump dependencies

@azure-tools/[email protected]

24 Sep 08:44
6faaac8
Compare
Choose a tag to compare

Bug Fixes

  • #1592 change example mapping logic to allow operation id with/without renaming
  • #1589 In 0.46.1 we changed the type of responses in SdkHttpOperation from Map<number | HttpRange, SdkHttpResponse> to SdkHttpResponse[], exceptions in SdkHttpOperation from Map<number | HttpRange | "*", SdkHttpResponse> to SdkHttpResponse[],
    and added a statusCodes property to SdkHttpResponse. But the statusCodes is defined as number | HttpRange | "*", which loses the information that the responses in responses property could never have a * as its statusCodes.
    This PR adds a new type SdkHttpErrorResponse with the statusCodes of number | HttpRange | "*", and changes the type of statusCodes in SdkHttpResponse to number | HttpRange to be precise.

@azure-tools/[email protected]

24 Sep 08:44
6faaac8
Compare
Choose a tag to compare

Bug Fixes

  • #1512 x-ms-skip-url-encoding should be replaced with allowReserved

@azure-tools/[email protected]

19 Sep 04:00
2b288d0
Compare
Choose a tag to compare

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
    1. The type of responses and exceptions in SdkHttpOperation changed from Map<number | HttpStatusCodeRange | "*", SdkHttpResponse> to SdkHttpResponse[].
    2. The type of responses in SdkHttpOperationExample changed from Map<number, SdkHttpResponseExampleValue> to SdkHttpResponseExampleValue[].
    3. SdkHttpResponse adds a new property statusCodes 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:
    for (const [statusCodes, response] of operation.responses)
    
    you could do the same in this way:
    for (const response of operation.responses)
    {
      const statusCodes = response.statusCodes;
    }
    
  • #1463
    1. The kind for unknown renamed from any to unknown.
    2. The values property in SdkUnionType renamed to variantTypes.
    3. The values property in SdkTupleType renamed to valueTypes.
    4. The example types for parameter, response and SdkType has been renamed to XXXExampleValue to emphasize that they are values instead of the example itself.
    5. The @format decorator is no longer able to change the type of the property.
  • #1539
    1. change encode in SdkBuiltInType to optional.
    2. no longer use the value of kind as encode when there is no encode on this type.
  • #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 with SdkExampleValue.

[email protected]

11 Sep 00:34
ddae9ae
Compare
Choose a tag to compare

@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 with examples-dir which will validate an absolute path is provided

    Case 1: Examples are in examples directory next to tspconfig.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 generic no-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 of Record<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 and summary 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 and isInternal helper function

Breaking Changes

  • #1440 Filter Core models directly instead of clear their usage
  • #1451 Have no client parameters appear on method signatures
  • #1420 clean up deprecation exports of previous version

@azure-tools/[email protected]

11 Sep 00:34
ddae9ae
Compare
Choose a tag to compare

Bug Fixes

  • #1357 Disable use-standard-operations azure core linter rule from resource-manager ruleset

Features

  • #1342 Replace no-operation-id linter rule with a more generic no-openapi rule guarding against any use of openapi decorators

@azure-tools/[email protected]

11 Sep 00:34
ddae9ae
Compare
Choose a tag to compare

No changes, version bump only.

@azure-tools/[email protected]

20 Aug 08:26
da17447
Compare
Choose a tag to compare

Bug Fixes

  • #1392 Fix multipart for client customization

@azure-tools/[email protected]

15 Aug 08:44
29b9538
Compare
Choose a tag to compare

Bug Fixes

  • #1328 change example file path to relative file path
  • #1338 consider scope when find service of a client
  • #1376 no need to add access override along with usage override for orphan model

Features

  • #1363 URI template support