From bf7d65782ebeb34b1c810c82810b608e704042b1 Mon Sep 17 00:00:00 2001 From: lnash94 Date: Thu, 28 Nov 2024 15:45:18 +0530 Subject: [PATCH 1/3] Update release note with OpenAPI changes --- .../swan-lake-2201.11.0/RELEASE_NOTE.md | 56 ++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md b/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md index 765ce64777e..b116ccda2a4 100644 --- a/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md +++ b/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md @@ -63,6 +63,60 @@ To view bug fixes, see the [GitHub milestone for Swan Lake Update 11 (2201.11.0) #### CLI #### OpenAPI tool +- Introduced the `flatten` sub-command, which flattens the OpenAPI contract file by moving + all the inline schemas to the components section. The output is a modified OpenAPI contract. + + ```bash + $ bal openapi flatten + ``` +- Introduced the `sanitize` sub-command, which sanitizes the OpenAPI contract file according to Ballerina's best + naming practices. The Ballerina name extensions are added to the schemas which can not be modified directly. + The output is a modified OpenAPI contract. + + ```bash + $ bal openpai sanitize + ``` +- Add code generation support with the new Ballerina name extensions. These extensions are mapped as relevant +annotations in the generated types, parameters and record fields. + For example, + ```yaml + ... + paths: + /albums: + get: + tags: + - albums + operationId: getAlbums + parameters: + - name: _artists_ + in: query + schema: + type: array + items: + type: string + default: [] + x-ballerina-name: artists --->// Ballerina name extension + responses: + "200": + description: Ok + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Album" + ``` + Generated Ballerina service type code, + ```ballerina + ... + resource function get albums(@http:Query {name: "_artists_"} string[] artists = []) returns Album[]; + ... + ``` + This code generation support is available for client, service implementation, and service type code generation. + + +- Added support for relaxed data binding on the client side payload. This enables, `nil` values are treated as optional, + and absent fields are handled as `nilable` types. ### Improvements @@ -73,7 +127,7 @@ To view bug fixes, see the [GitHub milestone for Swan Lake Update 11 (2201.11.0) To view bug fixes, see the GitHub milestone for Swan Lake Update 11 (2201.11.0) of the repositories below. - [Language server](https://github.com/ballerina-platform/ballerina-lang/issues?q=is%3Aissue+label%3ATeam%2FLanguageServer+milestone%3A2201.11.0+is%3Aclosed+label%3AType%2FBug+) -- [OpenAPI](https://github.com/ballerina-platform/openapi-tools/issues?q=is%3Aissue+label%3AType%2FBug+milestone%3A%22Swan+Lake+2201.11.0%22+is%3Aclosed) +- [OpenAPI](https://github.com/ballerina-platform/ballerina-library/issues?q=milestone%3A2201.11.0+is%3Aclosed+label%3Amodule%2Fopenapi-tools+label%3AType%2FBug) ## Ballerina packages updates From 82d9fc6d1b72b67178d78a002cdff91224c12128 Mon Sep 17 00:00:00 2001 From: Sumudu Nissanka Date: Fri, 29 Nov 2024 16:17:38 +0530 Subject: [PATCH 2/3] Fix review suggestions --- .../swan-lake-2201.11.0/RELEASE_NOTE.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md b/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md index b116ccda2a4..42ede72a96f 100644 --- a/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md +++ b/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md @@ -63,17 +63,14 @@ To view bug fixes, see the [GitHub milestone for Swan Lake Update 11 (2201.11.0) #### CLI #### OpenAPI tool -- Introduced the `flatten` sub-command, which flattens the OpenAPI contract file by moving - all the inline schemas to the components section. The output is a modified OpenAPI contract. +- Introduced the `flatten` sub-command, which flattens the OpenAPI contract file by moving all the inline schemas to the components section. The output is a modified OpenAPI contract. - ```bash + ``` $ bal openapi flatten ``` -- Introduced the `sanitize` sub-command, which sanitizes the OpenAPI contract file according to Ballerina's best - naming practices. The Ballerina name extensions are added to the schemas which can not be modified directly. - The output is a modified OpenAPI contract. +- Introduced the `sanitize` sub-command, which sanitizes the OpenAPI contract file according to Ballerina's best naming practices. The Ballerina name extensions are added to the schemas which can not be modified directly. The output is a modified OpenAPI contract. - ```bash + ``` $ bal openpai sanitize ``` - Add code generation support with the new Ballerina name extensions. These extensions are mapped as relevant @@ -115,8 +112,7 @@ annotations in the generated types, parameters and record fields. This code generation support is available for client, service implementation, and service type code generation. -- Added support for relaxed data binding on the client side payload. This enables, `nil` values are treated as optional, - and absent fields are handled as `nilable` types. +- Added support for relaxed data binding on the client side payload. This enables, `nil` values are treated as optional, and absent fields are handled as `nilable` types. ### Improvements From a557a77d2b5f0727a38b76bc0fb866369e392895 Mon Sep 17 00:00:00 2001 From: Sumudu Nissanka Date: Fri, 29 Nov 2024 16:21:21 +0530 Subject: [PATCH 3/3] Update RELEASE_NOTE.md --- .../swan-lake-2201.11.0/RELEASE_NOTE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md b/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md index 42ede72a96f..14c06330b17 100644 --- a/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md +++ b/downloads/swan-lake-release-notes/swan-lake-2201.11.0/RELEASE_NOTE.md @@ -73,8 +73,8 @@ To view bug fixes, see the [GitHub milestone for Swan Lake Update 11 (2201.11.0) ``` $ bal openpai sanitize ``` -- Add code generation support with the new Ballerina name extensions. These extensions are mapped as relevant -annotations in the generated types, parameters and record fields. +- Add code generation support with the new Ballerina name extensions. These extensions are mapped as relevant annotations in the generated types, parameters and record fields. + For example, ```yaml ...