diff --git a/.chronus/changes/fix-openapi-explode-query-false-2024-7-13-16-6-10.md b/.chronus/changes/fix-openapi-explode-query-false-2024-7-13-16-6-10.md deleted file mode 100644 index b58a605d97..0000000000 --- a/.chronus/changes/fix-openapi-explode-query-false-2024-7-13-16-6-10.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: fix -packages: - - "@typespec/openapi3" ---- - -Fix: query params are `explode: true` by default in OpenAPI 3.0 diff --git a/packages/openapi3/CHANGELOG.md b/packages/openapi3/CHANGELOG.md index 6847ca3535..aa12169faa 100644 --- a/packages/openapi3/CHANGELOG.md +++ b/packages/openapi3/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log - @typespec/openapi3 +## 0.59.1 + +### Bug Fixes + +- [#4168](https://github.com/microsoft/typespec/pull/4168) Fix: query params are `explode: true` by default in OpenAPI 3.0 + + ## 0.59.0 ### Bug Fixes diff --git a/packages/openapi3/package.json b/packages/openapi3/package.json index cda7bfc04a..ee49a9812f 100644 --- a/packages/openapi3/package.json +++ b/packages/openapi3/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/openapi3", - "version": "0.59.0", + "version": "0.59.1", "author": "Microsoft Corporation", "description": "TypeSpec library for emitting OpenAPI 3.0 from the TypeSpec REST protocol binding and converting OpenAPI3 to TypeSpec", "homepage": "https://typespec.io", diff --git a/packages/samples/test/output/grpc-library-example/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/grpc-library-example/@typespec/openapi3/openapi.yaml index 68eaa504d0..8f81ff3522 100644 --- a/packages/samples/test/output/grpc-library-example/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/grpc-library-example/@typespec/openapi3/openapi.yaml @@ -270,6 +270,7 @@ components: schema: type: integer format: int32 + explode: false ListRequestBase.page_token: name: page_token in: query @@ -281,6 +282,7 @@ components: returned from the previous call to `ListShelves` method. schema: type: string + explode: false MergeShelvesRequest.name: name: name in: path diff --git a/packages/samples/test/output/nullable/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/nullable/@typespec/openapi3/openapi.yaml index 534cf40e93..1c82d2ee04 100644 --- a/packages/samples/test/output/nullable/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/nullable/@typespec/openapi3/openapi.yaml @@ -14,6 +14,7 @@ paths: schema: type: string nullable: true + explode: false responses: '200': description: The request has succeeded. diff --git a/packages/samples/test/output/optional/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/optional/@typespec/openapi3/openapi.yaml index f6ea73e68d..87823a8631 100644 --- a/packages/samples/test/output/optional/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/optional/@typespec/openapi3/openapi.yaml @@ -14,6 +14,7 @@ paths: schema: type: string default: defaultQueryString + explode: false responses: '200': description: The request has succeeded. diff --git a/packages/samples/test/output/param-decorators/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/param-decorators/@typespec/openapi3/openapi.yaml index 2a8f87b071..486b24128f 100644 --- a/packages/samples/test/output/param-decorators/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/param-decorators/@typespec/openapi3/openapi.yaml @@ -23,6 +23,7 @@ paths: format: int32 minimum: 0 maximum: 10 + explode: false responses: '200': description: The request has succeeded. diff --git a/packages/samples/test/output/petstore/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/petstore/@typespec/openapi3/openapi.yaml index 0e25cb32ba..9708100162 100644 --- a/packages/samples/test/output/petstore/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/petstore/@typespec/openapi3/openapi.yaml @@ -15,6 +15,7 @@ paths: required: false schema: type: string + explode: false responses: '200': description: The request has succeeded. @@ -103,6 +104,7 @@ paths: required: true schema: type: string + explode: false responses: '200': description: The request has succeeded. diff --git a/packages/samples/test/output/rest/petstore/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/rest/petstore/@typespec/openapi3/openapi.yaml index 3222939783..26bbe10d6a 100644 --- a/packages/samples/test/output/rest/petstore/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/rest/petstore/@typespec/openapi3/openapi.yaml @@ -459,6 +459,7 @@ paths: required: true schema: type: string + explode: false responses: '200': description: The request has succeeded. diff --git a/packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml index 85d990e5d3..9161085fe3 100644 --- a/packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml @@ -86,7 +86,6 @@ paths: type: array items: type: string - explode: true responses: '200': description: The request has succeeded.