[Micronaut] Add option to describe response wrappers - #12186

Merged
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response
Apr 24, 2022
Merged

[Micronaut] Add option to describe response wrappers#12186
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response

Conversation

@andriy-dmytruk

@andriy-dmytrukandriy-dmytruk commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on this feature request: #12059

Adds 2 options to describe in what to wrap the return types of operations:

  • reactive=true will wrap the result in Mono
  • wrapInHttpResponse=true will wrap the result in micronaut HttpResponse
    As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);

Also, based on PR #12058 removes the parameter to reduce @Controller("${context-path}") to simply @Controller.

I ran the following to validate build:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"

@wing328

feature request author:
@pbthorste

Java technical committee:
@bbdouglas@sreeshas@jfiala@lukoyanov@cbornet@jeff9finger@karismann@Zomzog@lwlee2608

@wing328

Copy link
Copy Markdown
Member

Tested different combination of the new options and haven't spotted any issues.

@wing328
wing328 merged commit 52d8a96 into OpenAPITools:masterApr 24, 2022
@wing328

Copy link
Copy Markdown
Member

@andriy-dmytruk thanks for the enhancement, which has been merged into the master.

rk0n pushed a commit to rk0n/openapi-generator that referenced this pull request Apr 24, 2022
)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
@andriy-dmytruk

Copy link
Copy Markdown
ContributorAuthor

@wing328 Thank you

spacether added a commit that referenced this pull request Apr 26, 2022
* Add source folder variable to fastapi fix 12118
* Add generated sample files for python-fastapi fix 12118
* [python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set
* Updates template to properly render content type, regenerates samples
* Adds test_json_with_charset
* Reverts version file
* Fixes typo
* Add example allOf with single ref (#10948)
* Add example allOf with single ref
* fix dart-dio-next handling of that case
* Refactor without vendor extension
* Regenerate newer samples
* Add a sample of an enum model array in query params (#12107)
* [typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0
* [typescript-fetch] update docs
* [typescript-fetch] update package-lock.json manually & fix test
* [typescript-fetch] fix test
* update samples
* [dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
* fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config
The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.
This PR improves that by adding the relevant parts to the spec.
* style: use `OpenAPI` instead of `Swagger`
* refactor: make Set creation Java 8 compatible
* fix: add missing import
* [typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples
* [typescript-axios] update package.json & package-lock.json
* [typescript-node] drop support typescript below 4.0 & update samples
* [typescript-nestjs] drop support typescript below 4.0 & update samples
* [typescript-redux-query] drop support typescript below 4.0 & update samples
* [typescript-aurelia] drop support typescript below 4.0 & update samples
* [typescript-jquery] drop support typescript below 4.0 & update samples
* [typescript] drop support typescript below 4.0 & update samples
* Upgrade haskell-servant to latest LTS (#12092)
* [C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels
* update samples
* add file
* update readme with onesignal (#12126)
* [typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true
* [typescript-fetch] update samples
* [kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
* [python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it
* Adds missing schema definitions
* Skips fromProperty invocation if the passed in schema is none in getContent
* Makes MediaType.schema optional
* Adds checking that the content type is in self.content
* Sets ApiResponse body type as Unset if there is no schema for it
* Handles schema = None case
* Adds endpoint without response schema
* Reverts version files
* Adds test_response_without_schema
* improve errorObjectType to avoid regression (#12131)
* [php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates
* Remove default values from DI\get helper
It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.
* Refresh samples
* Bump async from 2.6.3 to 2.6.4 in /website (#12148)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* do not put the invalid value of the enum to a JSON structure (#12133)
* [Java] Ignore return value for Java file assert classes (#12145)
* Add @mkusaka to TS technical committee (#12150)
* Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
* [Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples
Co-authored-by: 0xnf <0xnf>
* [dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs
* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options
* [dart] Delete old generator doc files
* [Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support
* Remove redundant params_encoder config
* Memoize Faraday connection and refactor
* [Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.
Squashed commit of the following:
commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 18:22:54 2022 +0200
Polishing
commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:15:28 2022 +0200
Add JavaDoc
commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:11:17 2022 +0200
Add imports for inherited Properties
commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:40:36 2022 +0200
Generate Samples
commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:21:23 2022 +0200
SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.
commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 07:18:50 2022 +0200
Add allVars to omit list in OneOfImplementorAdditionalData
commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 16:40:23 2022 +0200
Works exactly as needed for oneOf/allOf in Java/Spring
commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 15:16:27 2022 +0200
Debug Session: identify critical codep path
commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Tue Apr 5 09:56:38 2022 +0200
Add test case to reproduce issue.
commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Tue Apr 5 06:57:30 2022 +0200
Add config to reproduce the issue
* Adjust indentation.
Co-authored-by: Lars Uffmann <lars@wintermute.local>
* [REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option
Implementation of #10028
* regenerated clients
* set follow_location default to true
* Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* update url to travis ci
* Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
* [python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint
* Regenerates samples
* Fixes singleton repr, removes issue components and endpoint
* Removes unused endpoint
* Reverts file
* Adds tests of enum, boolean, and none representations
* Uses super repr for singletons that ere not none, true, or false
* [swift5] Abstract away URLSession (#11651) (#12110)
* [Java][OkHTTP] fix empty request body handling (#12172)
* Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
* [Inline model resolver] minor enhancements/refactoring (#12175)
* better code format
* better code format, minor refactor
* [python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison
* Reverts file
* [php] make ObjectSerializer::toString actually return a string (#12158)
* update php samples
* Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation
* fix typo in pom.xml
* fix typo in pom.xml, update samples
* add exception when incorrect MP Rest Client version is chosen
* [Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0
* minor format change
* update samples
* Return type for Azure funcs (#12115)
* Azure func return type
* Changed to Task<IActionResult<T>
* Readme
* update doc
* Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator
* update samples
* update doc, samples
* [java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.
This change adds support for using the Optional wrapper for non-required
properties.
* update java samples
* [typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function
* [typescript-fetch] update samples
* [typescript-fetch] refactoring initFnction apply
* [typescript-fetch] update samples
* [typescript-fetch] refactoring create body function
* [typescript-fetch] update samples
* [typescript-fetch] make interface more flexible
* [typescript-fetch] update samples
* [typescript-fetch] support 2.x version of typescript & update samples
* [typescript-axios] update samples
* [typescript-fetch] refactor: add type alias
* [typescript-fetch] override with init params even if initOverrides is function
* [typescript-fetch] update samples
* [Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation
* add option to use specified operationId
* update samples
* update cli description
* [python-flask] Fix return type too strict (#12190)
Flask (and connexion by extension) allows the return type to be either
just the body, or the body & status code, or the body & status code &
headers.
This commit fixes the stated `rtype` to allow the latter two cases.
* update samples, docs
* Fixing bug in Kotlin Client with BigDecimal default value (#12213)
* Fix duplication of "Api" when structPrefix is set (#12128)
This fixes a minor duplication of the word "Api", which is already part
of the classname template parameter and doesn't need to be repeated when
structPrefix is set.
* add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
* remove spring-mvc samples (#12222)
* [Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
* Emit default values for aspnetcore 3 value types (#11280)
Fixes#10772 for aspnetcore 3+
This allows numbers to be set to zero, and booleans to be set to false.
It may make sense to port this fix to the other C# generators,
though it was partially fixed (for booleans only) in the netcore client in PR9042.
* update samples
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Tom Bärwinkel <dev@baerwinkel.org>
Co-authored-by: Anton Koscejev <koscejev@users.noreply.github.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
Co-authored-by: Eric Wolf <1983821+typetetris@users.noreply.github.com>
Co-authored-by: 0xNF <0xNF@users.noreply.github.com>
Co-authored-by: Yohei Kitamura <ykitamura@mdsol.com>
Co-authored-by: cachescrubber <5127753+cachescrubber@users.noreply.github.com>
Co-authored-by: Lars Uffmann <lars@wintermute.local>
Co-authored-by: Connor Moore <cmoore@aurorasolar.com>
Co-authored-by: leszek-s <1277962+leszek-s@users.noreply.github.com>
Co-authored-by: fengelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
Co-authored-by: Andrii Serkes <74911628+aserkes@users.noreply.github.com>
Co-authored-by: Abrhm7786 <82376602+Abrhm7786@users.noreply.github.com>
Co-authored-by: Auke Schrijnen <auke-@users.noreply.github.com>
Co-authored-by: adessoDpd <83429301+adessoDpd@users.noreply.github.com>
Co-authored-by: Oliver Ford <dev.github@ojford.com>
Co-authored-by: Johan Sjöblom <sjoblomj88@gmail.com>
Co-authored-by: Noah Fontes <noah.fontes@puppet.com>
Co-authored-by: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com>
Co-authored-by: matt beary <1661988+hauntingEcho@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andriy-dmytruk@wing328
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

[Micronaut] Add option to describe response wrappers - #12186

Merged
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response
Apr 24, 2022
Merged

[Micronaut] Add option to describe response wrappers#12186
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response

Conversation

@andriy-dmytruk

@andriy-dmytrukandriy-dmytruk commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on this feature request: #12059

Adds 2 options to describe in what to wrap the return types of operations:

  • reactive=true will wrap the result in Mono
  • wrapInHttpResponse=true will wrap the result in micronaut HttpResponse
    As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);

Also, based on PR #12058 removes the parameter to reduce @Controller("${context-path}") to simply @Controller.

I ran the following to validate build:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"

@wing328

feature request author:
@pbthorste

Java technical committee:
@bbdouglas@sreeshas@jfiala@lukoyanov@cbornet@jeff9finger@karismann@Zomzog@lwlee2608

@wing328

Copy link
Copy Markdown
Member

Tested different combination of the new options and haven't spotted any issues.

@wing328
wing328 merged commit 52d8a96 into OpenAPITools:masterApr 24, 2022
@wing328

Copy link
Copy Markdown
Member

@andriy-dmytruk thanks for the enhancement, which has been merged into the master.

rk0n pushed a commit to rk0n/openapi-generator that referenced this pull request Apr 24, 2022
)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
@andriy-dmytruk

Copy link
Copy Markdown
ContributorAuthor

@wing328 Thank you

spacether added a commit that referenced this pull request Apr 26, 2022
* Add source folder variable to fastapi fix 12118
* Add generated sample files for python-fastapi fix 12118
* [python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set
* Updates template to properly render content type, regenerates samples
* Adds test_json_with_charset
* Reverts version file
* Fixes typo
* Add example allOf with single ref (#10948)
* Add example allOf with single ref
* fix dart-dio-next handling of that case
* Refactor without vendor extension
* Regenerate newer samples
* Add a sample of an enum model array in query params (#12107)
* [typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0
* [typescript-fetch] update docs
* [typescript-fetch] update package-lock.json manually & fix test
* [typescript-fetch] fix test
* update samples
* [dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
* fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config
The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.
This PR improves that by adding the relevant parts to the spec.
* style: use `OpenAPI` instead of `Swagger`
* refactor: make Set creation Java 8 compatible
* fix: add missing import
* [typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples
* [typescript-axios] update package.json & package-lock.json
* [typescript-node] drop support typescript below 4.0 & update samples
* [typescript-nestjs] drop support typescript below 4.0 & update samples
* [typescript-redux-query] drop support typescript below 4.0 & update samples
* [typescript-aurelia] drop support typescript below 4.0 & update samples
* [typescript-jquery] drop support typescript below 4.0 & update samples
* [typescript] drop support typescript below 4.0 & update samples
* Upgrade haskell-servant to latest LTS (#12092)
* [C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels
* update samples
* add file
* update readme with onesignal (#12126)
* [typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true
* [typescript-fetch] update samples
* [kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
* [python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it
* Adds missing schema definitions
* Skips fromProperty invocation if the passed in schema is none in getContent
* Makes MediaType.schema optional
* Adds checking that the content type is in self.content
* Sets ApiResponse body type as Unset if there is no schema for it
* Handles schema = None case
* Adds endpoint without response schema
* Reverts version files
* Adds test_response_without_schema
* improve errorObjectType to avoid regression (#12131)
* [php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates
* Remove default values from DI\get helper
It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.
* Refresh samples
* Bump async from 2.6.3 to 2.6.4 in /website (#12148)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* do not put the invalid value of the enum to a JSON structure (#12133)
* [Java] Ignore return value for Java file assert classes (#12145)
* Add @mkusaka to TS technical committee (#12150)
* Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
* [Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples
Co-authored-by: 0xnf <0xnf>
* [dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs
* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options
* [dart] Delete old generator doc files
* [Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support
* Remove redundant params_encoder config
* Memoize Faraday connection and refactor
* [Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.
Squashed commit of the following:
commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 18:22:54 2022 +0200
Polishing
commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:15:28 2022 +0200
Add JavaDoc
commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:11:17 2022 +0200
Add imports for inherited Properties
commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:40:36 2022 +0200
Generate Samples
commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:21:23 2022 +0200
SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.
commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 07:18:50 2022 +0200
Add allVars to omit list in OneOfImplementorAdditionalData
commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 16:40:23 2022 +0200
Works exactly as needed for oneOf/allOf in Java/Spring
commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 15:16:27 2022 +0200
Debug Session: identify critical codep path
commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Tue Apr 5 09:56:38 2022 +0200
Add test case to reproduce issue.
commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Tue Apr 5 06:57:30 2022 +0200
Add config to reproduce the issue
* Adjust indentation.
Co-authored-by: Lars Uffmann <lars@wintermute.local>
* [REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option
Implementation of #10028
* regenerated clients
* set follow_location default to true
* Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* update url to travis ci
* Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
* [python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint
* Regenerates samples
* Fixes singleton repr, removes issue components and endpoint
* Removes unused endpoint
* Reverts file
* Adds tests of enum, boolean, and none representations
* Uses super repr for singletons that ere not none, true, or false
* [swift5] Abstract away URLSession (#11651) (#12110)
* [Java][OkHTTP] fix empty request body handling (#12172)
* Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
* [Inline model resolver] minor enhancements/refactoring (#12175)
* better code format
* better code format, minor refactor
* [python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison
* Reverts file
* [php] make ObjectSerializer::toString actually return a string (#12158)
* update php samples
* Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation
* fix typo in pom.xml
* fix typo in pom.xml, update samples
* add exception when incorrect MP Rest Client version is chosen
* [Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0
* minor format change
* update samples
* Return type for Azure funcs (#12115)
* Azure func return type
* Changed to Task<IActionResult<T>
* Readme
* update doc
* Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator
* update samples
* update doc, samples
* [java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.
This change adds support for using the Optional wrapper for non-required
properties.
* update java samples
* [typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function
* [typescript-fetch] update samples
* [typescript-fetch] refactoring initFnction apply
* [typescript-fetch] update samples
* [typescript-fetch] refactoring create body function
* [typescript-fetch] update samples
* [typescript-fetch] make interface more flexible
* [typescript-fetch] update samples
* [typescript-fetch] support 2.x version of typescript & update samples
* [typescript-axios] update samples
* [typescript-fetch] refactor: add type alias
* [typescript-fetch] override with init params even if initOverrides is function
* [typescript-fetch] update samples
* [Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation
* add option to use specified operationId
* update samples
* update cli description
* [python-flask] Fix return type too strict (#12190)
Flask (and connexion by extension) allows the return type to be either
just the body, or the body & status code, or the body & status code &
headers.
This commit fixes the stated `rtype` to allow the latter two cases.
* update samples, docs
* Fixing bug in Kotlin Client with BigDecimal default value (#12213)
* Fix duplication of "Api" when structPrefix is set (#12128)
This fixes a minor duplication of the word "Api", which is already part
of the classname template parameter and doesn't need to be repeated when
structPrefix is set.
* add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
* remove spring-mvc samples (#12222)
* [Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
* Emit default values for aspnetcore 3 value types (#11280)
Fixes#10772 for aspnetcore 3+
This allows numbers to be set to zero, and booleans to be set to false.
It may make sense to port this fix to the other C# generators,
though it was partially fixed (for booleans only) in the netcore client in PR9042.
* update samples
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Tom Bärwinkel <dev@baerwinkel.org>
Co-authored-by: Anton Koscejev <koscejev@users.noreply.github.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
Co-authored-by: Eric Wolf <1983821+typetetris@users.noreply.github.com>
Co-authored-by: 0xNF <0xNF@users.noreply.github.com>
Co-authored-by: Yohei Kitamura <ykitamura@mdsol.com>
Co-authored-by: cachescrubber <5127753+cachescrubber@users.noreply.github.com>
Co-authored-by: Lars Uffmann <lars@wintermute.local>
Co-authored-by: Connor Moore <cmoore@aurorasolar.com>
Co-authored-by: leszek-s <1277962+leszek-s@users.noreply.github.com>
Co-authored-by: fengelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
Co-authored-by: Andrii Serkes <74911628+aserkes@users.noreply.github.com>
Co-authored-by: Abrhm7786 <82376602+Abrhm7786@users.noreply.github.com>
Co-authored-by: Auke Schrijnen <auke-@users.noreply.github.com>
Co-authored-by: adessoDpd <83429301+adessoDpd@users.noreply.github.com>
Co-authored-by: Oliver Ford <dev.github@ojford.com>
Co-authored-by: Johan Sjöblom <sjoblomj88@gmail.com>
Co-authored-by: Noah Fontes <noah.fontes@puppet.com>
Co-authored-by: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com>
Co-authored-by: matt beary <1661988+hauntingEcho@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andriy-dmytruk@wing328
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[Micronaut] Add option to describe response wrappers - #12186

Merged
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response
Apr 24, 2022
Merged

[Micronaut] Add option to describe response wrappers#12186
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response

Conversation

@andriy-dmytruk

@andriy-dmytrukandriy-dmytruk commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on this feature request: #12059

Adds 2 options to describe in what to wrap the return types of operations:

  • reactive=true will wrap the result in Mono
  • wrapInHttpResponse=true will wrap the result in micronaut HttpResponse
    As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);

Also, based on PR #12058 removes the parameter to reduce @Controller("${context-path}") to simply @Controller.

I ran the following to validate build:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"

@wing328

feature request author:
@pbthorste

Java technical committee:
@bbdouglas@sreeshas@jfiala@lukoyanov@cbornet@jeff9finger@karismann@Zomzog@lwlee2608

@wing328

Copy link
Copy Markdown
Member

Tested different combination of the new options and haven't spotted any issues.

@wing328
wing328 merged commit 52d8a96 into OpenAPITools:masterApr 24, 2022
@wing328

Copy link
Copy Markdown
Member

@andriy-dmytruk thanks for the enhancement, which has been merged into the master.

rk0n pushed a commit to rk0n/openapi-generator that referenced this pull request Apr 24, 2022
)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
@andriy-dmytruk

Copy link
Copy Markdown
ContributorAuthor

@wing328 Thank you

spacether added a commit that referenced this pull request Apr 26, 2022
* Add source folder variable to fastapi fix 12118
* Add generated sample files for python-fastapi fix 12118
* [python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set
* Updates template to properly render content type, regenerates samples
* Adds test_json_with_charset
* Reverts version file
* Fixes typo
* Add example allOf with single ref (#10948)
* Add example allOf with single ref
* fix dart-dio-next handling of that case
* Refactor without vendor extension
* Regenerate newer samples
* Add a sample of an enum model array in query params (#12107)
* [typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0
* [typescript-fetch] update docs
* [typescript-fetch] update package-lock.json manually & fix test
* [typescript-fetch] fix test
* update samples
* [dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
* fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config
The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.
This PR improves that by adding the relevant parts to the spec.
* style: use `OpenAPI` instead of `Swagger`
* refactor: make Set creation Java 8 compatible
* fix: add missing import
* [typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples
* [typescript-axios] update package.json & package-lock.json
* [typescript-node] drop support typescript below 4.0 & update samples
* [typescript-nestjs] drop support typescript below 4.0 & update samples
* [typescript-redux-query] drop support typescript below 4.0 & update samples
* [typescript-aurelia] drop support typescript below 4.0 & update samples
* [typescript-jquery] drop support typescript below 4.0 & update samples
* [typescript] drop support typescript below 4.0 & update samples
* Upgrade haskell-servant to latest LTS (#12092)
* [C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels
* update samples
* add file
* update readme with onesignal (#12126)
* [typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true
* [typescript-fetch] update samples
* [kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
* [python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it
* Adds missing schema definitions
* Skips fromProperty invocation if the passed in schema is none in getContent
* Makes MediaType.schema optional
* Adds checking that the content type is in self.content
* Sets ApiResponse body type as Unset if there is no schema for it
* Handles schema = None case
* Adds endpoint without response schema
* Reverts version files
* Adds test_response_without_schema
* improve errorObjectType to avoid regression (#12131)
* [php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates
* Remove default values from DI\get helper
It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.
* Refresh samples
* Bump async from 2.6.3 to 2.6.4 in /website (#12148)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* do not put the invalid value of the enum to a JSON structure (#12133)
* [Java] Ignore return value for Java file assert classes (#12145)
* Add @mkusaka to TS technical committee (#12150)
* Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
* [Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples
Co-authored-by: 0xnf <0xnf>
* [dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs
* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options
* [dart] Delete old generator doc files
* [Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support
* Remove redundant params_encoder config
* Memoize Faraday connection and refactor
* [Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.
Squashed commit of the following:
commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 18:22:54 2022 +0200
Polishing
commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:15:28 2022 +0200
Add JavaDoc
commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:11:17 2022 +0200
Add imports for inherited Properties
commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:40:36 2022 +0200
Generate Samples
commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:21:23 2022 +0200
SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.
commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 07:18:50 2022 +0200
Add allVars to omit list in OneOfImplementorAdditionalData
commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 16:40:23 2022 +0200
Works exactly as needed for oneOf/allOf in Java/Spring
commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 15:16:27 2022 +0200
Debug Session: identify critical codep path
commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Tue Apr 5 09:56:38 2022 +0200
Add test case to reproduce issue.
commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Tue Apr 5 06:57:30 2022 +0200
Add config to reproduce the issue
* Adjust indentation.
Co-authored-by: Lars Uffmann <lars@wintermute.local>
* [REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option
Implementation of #10028
* regenerated clients
* set follow_location default to true
* Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* update url to travis ci
* Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
* [python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint
* Regenerates samples
* Fixes singleton repr, removes issue components and endpoint
* Removes unused endpoint
* Reverts file
* Adds tests of enum, boolean, and none representations
* Uses super repr for singletons that ere not none, true, or false
* [swift5] Abstract away URLSession (#11651) (#12110)
* [Java][OkHTTP] fix empty request body handling (#12172)
* Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
* [Inline model resolver] minor enhancements/refactoring (#12175)
* better code format
* better code format, minor refactor
* [python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison
* Reverts file
* [php] make ObjectSerializer::toString actually return a string (#12158)
* update php samples
* Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation
* fix typo in pom.xml
* fix typo in pom.xml, update samples
* add exception when incorrect MP Rest Client version is chosen
* [Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0
* minor format change
* update samples
* Return type for Azure funcs (#12115)
* Azure func return type
* Changed to Task<IActionResult<T>
* Readme
* update doc
* Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator
* update samples
* update doc, samples
* [java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.
This change adds support for using the Optional wrapper for non-required
properties.
* update java samples
* [typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function
* [typescript-fetch] update samples
* [typescript-fetch] refactoring initFnction apply
* [typescript-fetch] update samples
* [typescript-fetch] refactoring create body function
* [typescript-fetch] update samples
* [typescript-fetch] make interface more flexible
* [typescript-fetch] update samples
* [typescript-fetch] support 2.x version of typescript & update samples
* [typescript-axios] update samples
* [typescript-fetch] refactor: add type alias
* [typescript-fetch] override with init params even if initOverrides is function
* [typescript-fetch] update samples
* [Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation
* add option to use specified operationId
* update samples
* update cli description
* [python-flask] Fix return type too strict (#12190)
Flask (and connexion by extension) allows the return type to be either
just the body, or the body & status code, or the body & status code &
headers.
This commit fixes the stated `rtype` to allow the latter two cases.
* update samples, docs
* Fixing bug in Kotlin Client with BigDecimal default value (#12213)
* Fix duplication of "Api" when structPrefix is set (#12128)
This fixes a minor duplication of the word "Api", which is already part
of the classname template parameter and doesn't need to be repeated when
structPrefix is set.
* add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
* remove spring-mvc samples (#12222)
* [Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
* Emit default values for aspnetcore 3 value types (#11280)
Fixes#10772 for aspnetcore 3+
This allows numbers to be set to zero, and booleans to be set to false.
It may make sense to port this fix to the other C# generators,
though it was partially fixed (for booleans only) in the netcore client in PR9042.
* update samples
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Tom Bärwinkel <dev@baerwinkel.org>
Co-authored-by: Anton Koscejev <koscejev@users.noreply.github.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
Co-authored-by: Eric Wolf <1983821+typetetris@users.noreply.github.com>
Co-authored-by: 0xNF <0xNF@users.noreply.github.com>
Co-authored-by: Yohei Kitamura <ykitamura@mdsol.com>
Co-authored-by: cachescrubber <5127753+cachescrubber@users.noreply.github.com>
Co-authored-by: Lars Uffmann <lars@wintermute.local>
Co-authored-by: Connor Moore <cmoore@aurorasolar.com>
Co-authored-by: leszek-s <1277962+leszek-s@users.noreply.github.com>
Co-authored-by: fengelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
Co-authored-by: Andrii Serkes <74911628+aserkes@users.noreply.github.com>
Co-authored-by: Abrhm7786 <82376602+Abrhm7786@users.noreply.github.com>
Co-authored-by: Auke Schrijnen <auke-@users.noreply.github.com>
Co-authored-by: adessoDpd <83429301+adessoDpd@users.noreply.github.com>
Co-authored-by: Oliver Ford <dev.github@ojford.com>
Co-authored-by: Johan Sjöblom <sjoblomj88@gmail.com>
Co-authored-by: Noah Fontes <noah.fontes@puppet.com>
Co-authored-by: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com>
Co-authored-by: matt beary <1661988+hauntingEcho@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andriy-dmytruk@wing328
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[Micronaut] Add option to describe response wrappers - #12186

Merged
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response
Apr 24, 2022
Merged

[Micronaut] Add option to describe response wrappers#12186
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response

Conversation

@andriy-dmytruk

@andriy-dmytrukandriy-dmytruk commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on this feature request: #12059

Adds 2 options to describe in what to wrap the return types of operations:

  • reactive=true will wrap the result in Mono
  • wrapInHttpResponse=true will wrap the result in micronaut HttpResponse
    As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);

Also, based on PR #12058 removes the parameter to reduce @Controller("${context-path}") to simply @Controller.

I ran the following to validate build:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"

@wing328

feature request author:
@pbthorste

Java technical committee:
@bbdouglas@sreeshas@jfiala@lukoyanov@cbornet@jeff9finger@karismann@Zomzog@lwlee2608

@wing328

Copy link
Copy Markdown
Member

Tested different combination of the new options and haven't spotted any issues.

@wing328
wing328 merged commit 52d8a96 into OpenAPITools:masterApr 24, 2022
@wing328

Copy link
Copy Markdown
Member

@andriy-dmytruk thanks for the enhancement, which has been merged into the master.

rk0n pushed a commit to rk0n/openapi-generator that referenced this pull request Apr 24, 2022
)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
@andriy-dmytruk

Copy link
Copy Markdown
ContributorAuthor

@wing328 Thank you

spacether added a commit that referenced this pull request Apr 26, 2022
* Add source folder variable to fastapi fix 12118
* Add generated sample files for python-fastapi fix 12118
* [python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set
* Updates template to properly render content type, regenerates samples
* Adds test_json_with_charset
* Reverts version file
* Fixes typo
* Add example allOf with single ref (#10948)
* Add example allOf with single ref
* fix dart-dio-next handling of that case
* Refactor without vendor extension
* Regenerate newer samples
* Add a sample of an enum model array in query params (#12107)
* [typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0
* [typescript-fetch] update docs
* [typescript-fetch] update package-lock.json manually & fix test
* [typescript-fetch] fix test
* update samples
* [dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
* fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config
The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.
This PR improves that by adding the relevant parts to the spec.
* style: use `OpenAPI` instead of `Swagger`
* refactor: make Set creation Java 8 compatible
* fix: add missing import
* [typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples
* [typescript-axios] update package.json & package-lock.json
* [typescript-node] drop support typescript below 4.0 & update samples
* [typescript-nestjs] drop support typescript below 4.0 & update samples
* [typescript-redux-query] drop support typescript below 4.0 & update samples
* [typescript-aurelia] drop support typescript below 4.0 & update samples
* [typescript-jquery] drop support typescript below 4.0 & update samples
* [typescript] drop support typescript below 4.0 & update samples
* Upgrade haskell-servant to latest LTS (#12092)
* [C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels
* update samples
* add file
* update readme with onesignal (#12126)
* [typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true
* [typescript-fetch] update samples
* [kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
* [python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it
* Adds missing schema definitions
* Skips fromProperty invocation if the passed in schema is none in getContent
* Makes MediaType.schema optional
* Adds checking that the content type is in self.content
* Sets ApiResponse body type as Unset if there is no schema for it
* Handles schema = None case
* Adds endpoint without response schema
* Reverts version files
* Adds test_response_without_schema
* improve errorObjectType to avoid regression (#12131)
* [php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates
* Remove default values from DI\get helper
It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.
* Refresh samples
* Bump async from 2.6.3 to 2.6.4 in /website (#12148)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* do not put the invalid value of the enum to a JSON structure (#12133)
* [Java] Ignore return value for Java file assert classes (#12145)
* Add @mkusaka to TS technical committee (#12150)
* Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
* [Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples
Co-authored-by: 0xnf <0xnf>
* [dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs
* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options
* [dart] Delete old generator doc files
* [Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support
* Remove redundant params_encoder config
* Memoize Faraday connection and refactor
* [Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.
Squashed commit of the following:
commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 18:22:54 2022 +0200
Polishing
commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:15:28 2022 +0200
Add JavaDoc
commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:11:17 2022 +0200
Add imports for inherited Properties
commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:40:36 2022 +0200
Generate Samples
commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:21:23 2022 +0200
SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.
commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 07:18:50 2022 +0200
Add allVars to omit list in OneOfImplementorAdditionalData
commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 16:40:23 2022 +0200
Works exactly as needed for oneOf/allOf in Java/Spring
commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 15:16:27 2022 +0200
Debug Session: identify critical codep path
commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Tue Apr 5 09:56:38 2022 +0200
Add test case to reproduce issue.
commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Tue Apr 5 06:57:30 2022 +0200
Add config to reproduce the issue
* Adjust indentation.
Co-authored-by: Lars Uffmann <lars@wintermute.local>
* [REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option
Implementation of #10028
* regenerated clients
* set follow_location default to true
* Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* update url to travis ci
* Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
* [python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint
* Regenerates samples
* Fixes singleton repr, removes issue components and endpoint
* Removes unused endpoint
* Reverts file
* Adds tests of enum, boolean, and none representations
* Uses super repr for singletons that ere not none, true, or false
* [swift5] Abstract away URLSession (#11651) (#12110)
* [Java][OkHTTP] fix empty request body handling (#12172)
* Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
* [Inline model resolver] minor enhancements/refactoring (#12175)
* better code format
* better code format, minor refactor
* [python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison
* Reverts file
* [php] make ObjectSerializer::toString actually return a string (#12158)
* update php samples
* Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation
* fix typo in pom.xml
* fix typo in pom.xml, update samples
* add exception when incorrect MP Rest Client version is chosen
* [Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0
* minor format change
* update samples
* Return type for Azure funcs (#12115)
* Azure func return type
* Changed to Task<IActionResult<T>
* Readme
* update doc
* Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator
* update samples
* update doc, samples
* [java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.
This change adds support for using the Optional wrapper for non-required
properties.
* update java samples
* [typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function
* [typescript-fetch] update samples
* [typescript-fetch] refactoring initFnction apply
* [typescript-fetch] update samples
* [typescript-fetch] refactoring create body function
* [typescript-fetch] update samples
* [typescript-fetch] make interface more flexible
* [typescript-fetch] update samples
* [typescript-fetch] support 2.x version of typescript & update samples
* [typescript-axios] update samples
* [typescript-fetch] refactor: add type alias
* [typescript-fetch] override with init params even if initOverrides is function
* [typescript-fetch] update samples
* [Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation
* add option to use specified operationId
* update samples
* update cli description
* [python-flask] Fix return type too strict (#12190)
Flask (and connexion by extension) allows the return type to be either
just the body, or the body & status code, or the body & status code &
headers.
This commit fixes the stated `rtype` to allow the latter two cases.
* update samples, docs
* Fixing bug in Kotlin Client with BigDecimal default value (#12213)
* Fix duplication of "Api" when structPrefix is set (#12128)
This fixes a minor duplication of the word "Api", which is already part
of the classname template parameter and doesn't need to be repeated when
structPrefix is set.
* add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
* remove spring-mvc samples (#12222)
* [Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
* Emit default values for aspnetcore 3 value types (#11280)
Fixes#10772 for aspnetcore 3+
This allows numbers to be set to zero, and booleans to be set to false.
It may make sense to port this fix to the other C# generators,
though it was partially fixed (for booleans only) in the netcore client in PR9042.
* update samples
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Tom Bärwinkel <dev@baerwinkel.org>
Co-authored-by: Anton Koscejev <koscejev@users.noreply.github.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
Co-authored-by: Eric Wolf <1983821+typetetris@users.noreply.github.com>
Co-authored-by: 0xNF <0xNF@users.noreply.github.com>
Co-authored-by: Yohei Kitamura <ykitamura@mdsol.com>
Co-authored-by: cachescrubber <5127753+cachescrubber@users.noreply.github.com>
Co-authored-by: Lars Uffmann <lars@wintermute.local>
Co-authored-by: Connor Moore <cmoore@aurorasolar.com>
Co-authored-by: leszek-s <1277962+leszek-s@users.noreply.github.com>
Co-authored-by: fengelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
Co-authored-by: Andrii Serkes <74911628+aserkes@users.noreply.github.com>
Co-authored-by: Abrhm7786 <82376602+Abrhm7786@users.noreply.github.com>
Co-authored-by: Auke Schrijnen <auke-@users.noreply.github.com>
Co-authored-by: adessoDpd <83429301+adessoDpd@users.noreply.github.com>
Co-authored-by: Oliver Ford <dev.github@ojford.com>
Co-authored-by: Johan Sjöblom <sjoblomj88@gmail.com>
Co-authored-by: Noah Fontes <noah.fontes@puppet.com>
Co-authored-by: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com>
Co-authored-by: matt beary <1661988+hauntingEcho@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andriy-dmytruk@wing328
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

[Micronaut] Add option to describe response wrappers - #12186

Merged
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response
Apr 24, 2022
Merged

[Micronaut] Add option to describe response wrappers#12186
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response

Conversation

@andriy-dmytruk

@andriy-dmytrukandriy-dmytruk commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on this feature request: #12059

Adds 2 options to describe in what to wrap the return types of operations:

  • reactive=true will wrap the result in Mono
  • wrapInHttpResponse=true will wrap the result in micronaut HttpResponse
    As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);

Also, based on PR #12058 removes the parameter to reduce @Controller("${context-path}") to simply @Controller.

I ran the following to validate build:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"

@wing328

feature request author:
@pbthorste

Java technical committee:
@bbdouglas@sreeshas@jfiala@lukoyanov@cbornet@jeff9finger@karismann@Zomzog@lwlee2608

@wing328

Copy link
Copy Markdown
Member

Tested different combination of the new options and haven't spotted any issues.

@wing328
wing328 merged commit 52d8a96 into OpenAPITools:masterApr 24, 2022
@wing328

Copy link
Copy Markdown
Member

@andriy-dmytruk thanks for the enhancement, which has been merged into the master.

rk0n pushed a commit to rk0n/openapi-generator that referenced this pull request Apr 24, 2022
)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
@andriy-dmytruk

Copy link
Copy Markdown
ContributorAuthor

@wing328 Thank you

spacether added a commit that referenced this pull request Apr 26, 2022
* Add source folder variable to fastapi fix 12118
* Add generated sample files for python-fastapi fix 12118
* [python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set
* Updates template to properly render content type, regenerates samples
* Adds test_json_with_charset
* Reverts version file
* Fixes typo
* Add example allOf with single ref (#10948)
* Add example allOf with single ref
* fix dart-dio-next handling of that case
* Refactor without vendor extension
* Regenerate newer samples
* Add a sample of an enum model array in query params (#12107)
* [typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0
* [typescript-fetch] update docs
* [typescript-fetch] update package-lock.json manually & fix test
* [typescript-fetch] fix test
* update samples
* [dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
* fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config
The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.
This PR improves that by adding the relevant parts to the spec.
* style: use `OpenAPI` instead of `Swagger`
* refactor: make Set creation Java 8 compatible
* fix: add missing import
* [typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples
* [typescript-axios] update package.json & package-lock.json
* [typescript-node] drop support typescript below 4.0 & update samples
* [typescript-nestjs] drop support typescript below 4.0 & update samples
* [typescript-redux-query] drop support typescript below 4.0 & update samples
* [typescript-aurelia] drop support typescript below 4.0 & update samples
* [typescript-jquery] drop support typescript below 4.0 & update samples
* [typescript] drop support typescript below 4.0 & update samples
* Upgrade haskell-servant to latest LTS (#12092)
* [C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels
* update samples
* add file
* update readme with onesignal (#12126)
* [typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true
* [typescript-fetch] update samples
* [kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
* [python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it
* Adds missing schema definitions
* Skips fromProperty invocation if the passed in schema is none in getContent
* Makes MediaType.schema optional
* Adds checking that the content type is in self.content
* Sets ApiResponse body type as Unset if there is no schema for it
* Handles schema = None case
* Adds endpoint without response schema
* Reverts version files
* Adds test_response_without_schema
* improve errorObjectType to avoid regression (#12131)
* [php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates
* Remove default values from DI\get helper
It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.
* Refresh samples
* Bump async from 2.6.3 to 2.6.4 in /website (#12148)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* do not put the invalid value of the enum to a JSON structure (#12133)
* [Java] Ignore return value for Java file assert classes (#12145)
* Add @mkusaka to TS technical committee (#12150)
* Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
* [Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples
Co-authored-by: 0xnf <0xnf>
* [dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs
* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options
* [dart] Delete old generator doc files
* [Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support
* Remove redundant params_encoder config
* Memoize Faraday connection and refactor
* [Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.
Squashed commit of the following:
commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 18:22:54 2022 +0200
Polishing
commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:15:28 2022 +0200
Add JavaDoc
commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:11:17 2022 +0200
Add imports for inherited Properties
commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:40:36 2022 +0200
Generate Samples
commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:21:23 2022 +0200
SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.
commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 07:18:50 2022 +0200
Add allVars to omit list in OneOfImplementorAdditionalData
commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 16:40:23 2022 +0200
Works exactly as needed for oneOf/allOf in Java/Spring
commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 15:16:27 2022 +0200
Debug Session: identify critical codep path
commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Tue Apr 5 09:56:38 2022 +0200
Add test case to reproduce issue.
commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Tue Apr 5 06:57:30 2022 +0200
Add config to reproduce the issue
* Adjust indentation.
Co-authored-by: Lars Uffmann <lars@wintermute.local>
* [REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option
Implementation of #10028
* regenerated clients
* set follow_location default to true
* Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* update url to travis ci
* Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
* [python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint
* Regenerates samples
* Fixes singleton repr, removes issue components and endpoint
* Removes unused endpoint
* Reverts file
* Adds tests of enum, boolean, and none representations
* Uses super repr for singletons that ere not none, true, or false
* [swift5] Abstract away URLSession (#11651) (#12110)
* [Java][OkHTTP] fix empty request body handling (#12172)
* Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
* [Inline model resolver] minor enhancements/refactoring (#12175)
* better code format
* better code format, minor refactor
* [python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison
* Reverts file
* [php] make ObjectSerializer::toString actually return a string (#12158)
* update php samples
* Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation
* fix typo in pom.xml
* fix typo in pom.xml, update samples
* add exception when incorrect MP Rest Client version is chosen
* [Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0
* minor format change
* update samples
* Return type for Azure funcs (#12115)
* Azure func return type
* Changed to Task<IActionResult<T>
* Readme
* update doc
* Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator
* update samples
* update doc, samples
* [java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.
This change adds support for using the Optional wrapper for non-required
properties.
* update java samples
* [typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function
* [typescript-fetch] update samples
* [typescript-fetch] refactoring initFnction apply
* [typescript-fetch] update samples
* [typescript-fetch] refactoring create body function
* [typescript-fetch] update samples
* [typescript-fetch] make interface more flexible
* [typescript-fetch] update samples
* [typescript-fetch] support 2.x version of typescript & update samples
* [typescript-axios] update samples
* [typescript-fetch] refactor: add type alias
* [typescript-fetch] override with init params even if initOverrides is function
* [typescript-fetch] update samples
* [Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation
* add option to use specified operationId
* update samples
* update cli description
* [python-flask] Fix return type too strict (#12190)
Flask (and connexion by extension) allows the return type to be either
just the body, or the body & status code, or the body & status code &
headers.
This commit fixes the stated `rtype` to allow the latter two cases.
* update samples, docs
* Fixing bug in Kotlin Client with BigDecimal default value (#12213)
* Fix duplication of "Api" when structPrefix is set (#12128)
This fixes a minor duplication of the word "Api", which is already part
of the classname template parameter and doesn't need to be repeated when
structPrefix is set.
* add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
* remove spring-mvc samples (#12222)
* [Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
* Emit default values for aspnetcore 3 value types (#11280)
Fixes#10772 for aspnetcore 3+
This allows numbers to be set to zero, and booleans to be set to false.
It may make sense to port this fix to the other C# generators,
though it was partially fixed (for booleans only) in the netcore client in PR9042.
* update samples
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Tom Bärwinkel <dev@baerwinkel.org>
Co-authored-by: Anton Koscejev <koscejev@users.noreply.github.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
Co-authored-by: Eric Wolf <1983821+typetetris@users.noreply.github.com>
Co-authored-by: 0xNF <0xNF@users.noreply.github.com>
Co-authored-by: Yohei Kitamura <ykitamura@mdsol.com>
Co-authored-by: cachescrubber <5127753+cachescrubber@users.noreply.github.com>
Co-authored-by: Lars Uffmann <lars@wintermute.local>
Co-authored-by: Connor Moore <cmoore@aurorasolar.com>
Co-authored-by: leszek-s <1277962+leszek-s@users.noreply.github.com>
Co-authored-by: fengelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
Co-authored-by: Andrii Serkes <74911628+aserkes@users.noreply.github.com>
Co-authored-by: Abrhm7786 <82376602+Abrhm7786@users.noreply.github.com>
Co-authored-by: Auke Schrijnen <auke-@users.noreply.github.com>
Co-authored-by: adessoDpd <83429301+adessoDpd@users.noreply.github.com>
Co-authored-by: Oliver Ford <dev.github@ojford.com>
Co-authored-by: Johan Sjöblom <sjoblomj88@gmail.com>
Co-authored-by: Noah Fontes <noah.fontes@puppet.com>
Co-authored-by: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com>
Co-authored-by: matt beary <1661988+hauntingEcho@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andriy-dmytruk@wing328
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[Micronaut] Add option to describe response wrappers - #12186

Merged
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response
Apr 24, 2022
Merged

[Micronaut] Add option to describe response wrappers#12186
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response

Conversation

@andriy-dmytruk

@andriy-dmytrukandriy-dmytruk commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on this feature request: #12059

Adds 2 options to describe in what to wrap the return types of operations:

  • reactive=true will wrap the result in Mono
  • wrapInHttpResponse=true will wrap the result in micronaut HttpResponse
    As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);

Also, based on PR #12058 removes the parameter to reduce @Controller("${context-path}") to simply @Controller.

I ran the following to validate build:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"

@wing328

feature request author:
@pbthorste

Java technical committee:
@bbdouglas@sreeshas@jfiala@lukoyanov@cbornet@jeff9finger@karismann@Zomzog@lwlee2608

@wing328

Copy link
Copy Markdown
Member

Tested different combination of the new options and haven't spotted any issues.

@wing328
wing328 merged commit 52d8a96 into OpenAPITools:masterApr 24, 2022
@wing328

Copy link
Copy Markdown
Member

@andriy-dmytruk thanks for the enhancement, which has been merged into the master.

rk0n pushed a commit to rk0n/openapi-generator that referenced this pull request Apr 24, 2022
)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
@andriy-dmytruk

Copy link
Copy Markdown
ContributorAuthor

@wing328 Thank you

spacether added a commit that referenced this pull request Apr 26, 2022
* Add source folder variable to fastapi fix 12118
* Add generated sample files for python-fastapi fix 12118
* [python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set
* Updates template to properly render content type, regenerates samples
* Adds test_json_with_charset
* Reverts version file
* Fixes typo
* Add example allOf with single ref (#10948)
* Add example allOf with single ref
* fix dart-dio-next handling of that case
* Refactor without vendor extension
* Regenerate newer samples
* Add a sample of an enum model array in query params (#12107)
* [typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0
* [typescript-fetch] update docs
* [typescript-fetch] update package-lock.json manually & fix test
* [typescript-fetch] fix test
* update samples
* [dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
* fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config
The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.
This PR improves that by adding the relevant parts to the spec.
* style: use `OpenAPI` instead of `Swagger`
* refactor: make Set creation Java 8 compatible
* fix: add missing import
* [typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples
* [typescript-axios] update package.json & package-lock.json
* [typescript-node] drop support typescript below 4.0 & update samples
* [typescript-nestjs] drop support typescript below 4.0 & update samples
* [typescript-redux-query] drop support typescript below 4.0 & update samples
* [typescript-aurelia] drop support typescript below 4.0 & update samples
* [typescript-jquery] drop support typescript below 4.0 & update samples
* [typescript] drop support typescript below 4.0 & update samples
* Upgrade haskell-servant to latest LTS (#12092)
* [C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels
* update samples
* add file
* update readme with onesignal (#12126)
* [typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true
* [typescript-fetch] update samples
* [kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
* [python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it
* Adds missing schema definitions
* Skips fromProperty invocation if the passed in schema is none in getContent
* Makes MediaType.schema optional
* Adds checking that the content type is in self.content
* Sets ApiResponse body type as Unset if there is no schema for it
* Handles schema = None case
* Adds endpoint without response schema
* Reverts version files
* Adds test_response_without_schema
* improve errorObjectType to avoid regression (#12131)
* [php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates
* Remove default values from DI\get helper
It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.
* Refresh samples
* Bump async from 2.6.3 to 2.6.4 in /website (#12148)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* do not put the invalid value of the enum to a JSON structure (#12133)
* [Java] Ignore return value for Java file assert classes (#12145)
* Add @mkusaka to TS technical committee (#12150)
* Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
* [Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples
Co-authored-by: 0xnf <0xnf>
* [dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs
* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options
* [dart] Delete old generator doc files
* [Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support
* Remove redundant params_encoder config
* Memoize Faraday connection and refactor
* [Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.
Squashed commit of the following:
commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 18:22:54 2022 +0200
Polishing
commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:15:28 2022 +0200
Add JavaDoc
commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:11:17 2022 +0200
Add imports for inherited Properties
commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:40:36 2022 +0200
Generate Samples
commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:21:23 2022 +0200
SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.
commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 07:18:50 2022 +0200
Add allVars to omit list in OneOfImplementorAdditionalData
commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 16:40:23 2022 +0200
Works exactly as needed for oneOf/allOf in Java/Spring
commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 15:16:27 2022 +0200
Debug Session: identify critical codep path
commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Tue Apr 5 09:56:38 2022 +0200
Add test case to reproduce issue.
commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Tue Apr 5 06:57:30 2022 +0200
Add config to reproduce the issue
* Adjust indentation.
Co-authored-by: Lars Uffmann <lars@wintermute.local>
* [REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option
Implementation of #10028
* regenerated clients
* set follow_location default to true
* Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* update url to travis ci
* Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
* [python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint
* Regenerates samples
* Fixes singleton repr, removes issue components and endpoint
* Removes unused endpoint
* Reverts file
* Adds tests of enum, boolean, and none representations
* Uses super repr for singletons that ere not none, true, or false
* [swift5] Abstract away URLSession (#11651) (#12110)
* [Java][OkHTTP] fix empty request body handling (#12172)
* Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
* [Inline model resolver] minor enhancements/refactoring (#12175)
* better code format
* better code format, minor refactor
* [python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison
* Reverts file
* [php] make ObjectSerializer::toString actually return a string (#12158)
* update php samples
* Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation
* fix typo in pom.xml
* fix typo in pom.xml, update samples
* add exception when incorrect MP Rest Client version is chosen
* [Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0
* minor format change
* update samples
* Return type for Azure funcs (#12115)
* Azure func return type
* Changed to Task<IActionResult<T>
* Readme
* update doc
* Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator
* update samples
* update doc, samples
* [java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.
This change adds support for using the Optional wrapper for non-required
properties.
* update java samples
* [typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function
* [typescript-fetch] update samples
* [typescript-fetch] refactoring initFnction apply
* [typescript-fetch] update samples
* [typescript-fetch] refactoring create body function
* [typescript-fetch] update samples
* [typescript-fetch] make interface more flexible
* [typescript-fetch] update samples
* [typescript-fetch] support 2.x version of typescript & update samples
* [typescript-axios] update samples
* [typescript-fetch] refactor: add type alias
* [typescript-fetch] override with init params even if initOverrides is function
* [typescript-fetch] update samples
* [Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation
* add option to use specified operationId
* update samples
* update cli description
* [python-flask] Fix return type too strict (#12190)
Flask (and connexion by extension) allows the return type to be either
just the body, or the body & status code, or the body & status code &
headers.
This commit fixes the stated `rtype` to allow the latter two cases.
* update samples, docs
* Fixing bug in Kotlin Client with BigDecimal default value (#12213)
* Fix duplication of "Api" when structPrefix is set (#12128)
This fixes a minor duplication of the word "Api", which is already part
of the classname template parameter and doesn't need to be repeated when
structPrefix is set.
* add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
* remove spring-mvc samples (#12222)
* [Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
* Emit default values for aspnetcore 3 value types (#11280)
Fixes#10772 for aspnetcore 3+
This allows numbers to be set to zero, and booleans to be set to false.
It may make sense to port this fix to the other C# generators,
though it was partially fixed (for booleans only) in the netcore client in PR9042.
* update samples
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Tom Bärwinkel <dev@baerwinkel.org>
Co-authored-by: Anton Koscejev <koscejev@users.noreply.github.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
Co-authored-by: Eric Wolf <1983821+typetetris@users.noreply.github.com>
Co-authored-by: 0xNF <0xNF@users.noreply.github.com>
Co-authored-by: Yohei Kitamura <ykitamura@mdsol.com>
Co-authored-by: cachescrubber <5127753+cachescrubber@users.noreply.github.com>
Co-authored-by: Lars Uffmann <lars@wintermute.local>
Co-authored-by: Connor Moore <cmoore@aurorasolar.com>
Co-authored-by: leszek-s <1277962+leszek-s@users.noreply.github.com>
Co-authored-by: fengelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
Co-authored-by: Andrii Serkes <74911628+aserkes@users.noreply.github.com>
Co-authored-by: Abrhm7786 <82376602+Abrhm7786@users.noreply.github.com>
Co-authored-by: Auke Schrijnen <auke-@users.noreply.github.com>
Co-authored-by: adessoDpd <83429301+adessoDpd@users.noreply.github.com>
Co-authored-by: Oliver Ford <dev.github@ojford.com>
Co-authored-by: Johan Sjöblom <sjoblomj88@gmail.com>
Co-authored-by: Noah Fontes <noah.fontes@puppet.com>
Co-authored-by: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com>
Co-authored-by: matt beary <1661988+hauntingEcho@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andriy-dmytruk@wing328
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[Micronaut] Add option to describe response wrappers - #12186

Merged
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response
Apr 24, 2022
Merged

[Micronaut] Add option to describe response wrappers#12186
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response

Conversation

@andriy-dmytruk

@andriy-dmytrukandriy-dmytruk commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on this feature request: #12059

Adds 2 options to describe in what to wrap the return types of operations:

  • reactive=true will wrap the result in Mono
  • wrapInHttpResponse=true will wrap the result in micronaut HttpResponse
    As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);

Also, based on PR #12058 removes the parameter to reduce @Controller("${context-path}") to simply @Controller.

I ran the following to validate build:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"

@wing328

feature request author:
@pbthorste

Java technical committee:
@bbdouglas@sreeshas@jfiala@lukoyanov@cbornet@jeff9finger@karismann@Zomzog@lwlee2608

@wing328

Copy link
Copy Markdown
Member

Tested different combination of the new options and haven't spotted any issues.

@wing328
wing328 merged commit 52d8a96 into OpenAPITools:masterApr 24, 2022
@wing328

Copy link
Copy Markdown
Member

@andriy-dmytruk thanks for the enhancement, which has been merged into the master.

rk0n pushed a commit to rk0n/openapi-generator that referenced this pull request Apr 24, 2022
)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
@andriy-dmytruk

Copy link
Copy Markdown
ContributorAuthor

@wing328 Thank you

spacether added a commit that referenced this pull request Apr 26, 2022
* Add source folder variable to fastapi fix 12118
* Add generated sample files for python-fastapi fix 12118
* [python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set
* Updates template to properly render content type, regenerates samples
* Adds test_json_with_charset
* Reverts version file
* Fixes typo
* Add example allOf with single ref (#10948)
* Add example allOf with single ref
* fix dart-dio-next handling of that case
* Refactor without vendor extension
* Regenerate newer samples
* Add a sample of an enum model array in query params (#12107)
* [typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0
* [typescript-fetch] update docs
* [typescript-fetch] update package-lock.json manually & fix test
* [typescript-fetch] fix test
* update samples
* [dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
* fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config
The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.
This PR improves that by adding the relevant parts to the spec.
* style: use `OpenAPI` instead of `Swagger`
* refactor: make Set creation Java 8 compatible
* fix: add missing import
* [typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples
* [typescript-axios] update package.json & package-lock.json
* [typescript-node] drop support typescript below 4.0 & update samples
* [typescript-nestjs] drop support typescript below 4.0 & update samples
* [typescript-redux-query] drop support typescript below 4.0 & update samples
* [typescript-aurelia] drop support typescript below 4.0 & update samples
* [typescript-jquery] drop support typescript below 4.0 & update samples
* [typescript] drop support typescript below 4.0 & update samples
* Upgrade haskell-servant to latest LTS (#12092)
* [C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels
* update samples
* add file
* update readme with onesignal (#12126)
* [typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true
* [typescript-fetch] update samples
* [kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
* [python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it
* Adds missing schema definitions
* Skips fromProperty invocation if the passed in schema is none in getContent
* Makes MediaType.schema optional
* Adds checking that the content type is in self.content
* Sets ApiResponse body type as Unset if there is no schema for it
* Handles schema = None case
* Adds endpoint without response schema
* Reverts version files
* Adds test_response_without_schema
* improve errorObjectType to avoid regression (#12131)
* [php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates
* Remove default values from DI\get helper
It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.
* Refresh samples
* Bump async from 2.6.3 to 2.6.4 in /website (#12148)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* do not put the invalid value of the enum to a JSON structure (#12133)
* [Java] Ignore return value for Java file assert classes (#12145)
* Add @mkusaka to TS technical committee (#12150)
* Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
* [Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples
Co-authored-by: 0xnf <0xnf>
* [dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs
* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options
* [dart] Delete old generator doc files
* [Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support
* Remove redundant params_encoder config
* Memoize Faraday connection and refactor
* [Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.
Squashed commit of the following:
commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 18:22:54 2022 +0200
Polishing
commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:15:28 2022 +0200
Add JavaDoc
commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:11:17 2022 +0200
Add imports for inherited Properties
commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:40:36 2022 +0200
Generate Samples
commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:21:23 2022 +0200
SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.
commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 07:18:50 2022 +0200
Add allVars to omit list in OneOfImplementorAdditionalData
commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 16:40:23 2022 +0200
Works exactly as needed for oneOf/allOf in Java/Spring
commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 15:16:27 2022 +0200
Debug Session: identify critical codep path
commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Tue Apr 5 09:56:38 2022 +0200
Add test case to reproduce issue.
commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Tue Apr 5 06:57:30 2022 +0200
Add config to reproduce the issue
* Adjust indentation.
Co-authored-by: Lars Uffmann <lars@wintermute.local>
* [REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option
Implementation of #10028
* regenerated clients
* set follow_location default to true
* Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* update url to travis ci
* Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
* [python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint
* Regenerates samples
* Fixes singleton repr, removes issue components and endpoint
* Removes unused endpoint
* Reverts file
* Adds tests of enum, boolean, and none representations
* Uses super repr for singletons that ere not none, true, or false
* [swift5] Abstract away URLSession (#11651) (#12110)
* [Java][OkHTTP] fix empty request body handling (#12172)
* Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
* [Inline model resolver] minor enhancements/refactoring (#12175)
* better code format
* better code format, minor refactor
* [python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison
* Reverts file
* [php] make ObjectSerializer::toString actually return a string (#12158)
* update php samples
* Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation
* fix typo in pom.xml
* fix typo in pom.xml, update samples
* add exception when incorrect MP Rest Client version is chosen
* [Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0
* minor format change
* update samples
* Return type for Azure funcs (#12115)
* Azure func return type
* Changed to Task<IActionResult<T>
* Readme
* update doc
* Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator
* update samples
* update doc, samples
* [java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.
This change adds support for using the Optional wrapper for non-required
properties.
* update java samples
* [typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function
* [typescript-fetch] update samples
* [typescript-fetch] refactoring initFnction apply
* [typescript-fetch] update samples
* [typescript-fetch] refactoring create body function
* [typescript-fetch] update samples
* [typescript-fetch] make interface more flexible
* [typescript-fetch] update samples
* [typescript-fetch] support 2.x version of typescript & update samples
* [typescript-axios] update samples
* [typescript-fetch] refactor: add type alias
* [typescript-fetch] override with init params even if initOverrides is function
* [typescript-fetch] update samples
* [Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation
* add option to use specified operationId
* update samples
* update cli description
* [python-flask] Fix return type too strict (#12190)
Flask (and connexion by extension) allows the return type to be either
just the body, or the body & status code, or the body & status code &
headers.
This commit fixes the stated `rtype` to allow the latter two cases.
* update samples, docs
* Fixing bug in Kotlin Client with BigDecimal default value (#12213)
* Fix duplication of "Api" when structPrefix is set (#12128)
This fixes a minor duplication of the word "Api", which is already part
of the classname template parameter and doesn't need to be repeated when
structPrefix is set.
* add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
* remove spring-mvc samples (#12222)
* [Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
* Emit default values for aspnetcore 3 value types (#11280)
Fixes#10772 for aspnetcore 3+
This allows numbers to be set to zero, and booleans to be set to false.
It may make sense to port this fix to the other C# generators,
though it was partially fixed (for booleans only) in the netcore client in PR9042.
* update samples
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Tom Bärwinkel <dev@baerwinkel.org>
Co-authored-by: Anton Koscejev <koscejev@users.noreply.github.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
Co-authored-by: Eric Wolf <1983821+typetetris@users.noreply.github.com>
Co-authored-by: 0xNF <0xNF@users.noreply.github.com>
Co-authored-by: Yohei Kitamura <ykitamura@mdsol.com>
Co-authored-by: cachescrubber <5127753+cachescrubber@users.noreply.github.com>
Co-authored-by: Lars Uffmann <lars@wintermute.local>
Co-authored-by: Connor Moore <cmoore@aurorasolar.com>
Co-authored-by: leszek-s <1277962+leszek-s@users.noreply.github.com>
Co-authored-by: fengelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
Co-authored-by: Andrii Serkes <74911628+aserkes@users.noreply.github.com>
Co-authored-by: Abrhm7786 <82376602+Abrhm7786@users.noreply.github.com>
Co-authored-by: Auke Schrijnen <auke-@users.noreply.github.com>
Co-authored-by: adessoDpd <83429301+adessoDpd@users.noreply.github.com>
Co-authored-by: Oliver Ford <dev.github@ojford.com>
Co-authored-by: Johan Sjöblom <sjoblomj88@gmail.com>
Co-authored-by: Noah Fontes <noah.fontes@puppet.com>
Co-authored-by: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com>
Co-authored-by: matt beary <1661988+hauntingEcho@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andriy-dmytruk@wing328
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[Micronaut] Add option to describe response wrappers - #12186

Merged
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response
Apr 24, 2022
Merged

[Micronaut] Add option to describe response wrappers#12186
wing328 merged 7 commits into
OpenAPITools:masterfrom
andriy-dmytruk:micronaut-dev-http-response

Conversation

@andriy-dmytruk

@andriy-dmytrukandriy-dmytruk commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on this feature request: #12059

Adds 2 options to describe in what to wrap the return types of operations:

  • reactive=true will wrap the result in Mono
  • wrapInHttpResponse=true will wrap the result in micronaut HttpResponse
    As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);

Also, based on PR #12058 removes the parameter to reduce @Controller("${context-path}") to simply @Controller.

I ran the following to validate build:

./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"

@wing328

feature request author:
@pbthorste

Java technical committee:
@bbdouglas@sreeshas@jfiala@lukoyanov@cbornet@jeff9finger@karismann@Zomzog@lwlee2608

@wing328

Copy link
Copy Markdown
Member

Tested different combination of the new options and haven't spotted any issues.

@wing328
wing328 merged commit 52d8a96 into OpenAPITools:masterApr 24, 2022
@wing328

Copy link
Copy Markdown
Member

@andriy-dmytruk thanks for the enhancement, which has been merged into the master.

rk0n pushed a commit to rk0n/openapi-generator that referenced this pull request Apr 24, 2022
)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
@andriy-dmytruk

Copy link
Copy Markdown
ContributorAuthor

@wing328 Thank you

spacether added a commit that referenced this pull request Apr 26, 2022
* Add source folder variable to fastapi fix 12118
* Add generated sample files for python-fastapi fix 12118
* [python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set
* Updates template to properly render content type, regenerates samples
* Adds test_json_with_charset
* Reverts version file
* Fixes typo
* Add example allOf with single ref (#10948)
* Add example allOf with single ref
* fix dart-dio-next handling of that case
* Refactor without vendor extension
* Regenerate newer samples
* Add a sample of an enum model array in query params (#12107)
* [typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0
* [typescript-fetch] update docs
* [typescript-fetch] update package-lock.json manually & fix test
* [typescript-fetch] fix test
* update samples
* [dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
* fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config
The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.
This PR improves that by adding the relevant parts to the spec.
* style: use `OpenAPI` instead of `Swagger`
* refactor: make Set creation Java 8 compatible
* fix: add missing import
* [typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples
* [typescript-axios] update package.json & package-lock.json
* [typescript-node] drop support typescript below 4.0 & update samples
* [typescript-nestjs] drop support typescript below 4.0 & update samples
* [typescript-redux-query] drop support typescript below 4.0 & update samples
* [typescript-aurelia] drop support typescript below 4.0 & update samples
* [typescript-jquery] drop support typescript below 4.0 & update samples
* [typescript] drop support typescript below 4.0 & update samples
* Upgrade haskell-servant to latest LTS (#12092)
* [C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels
* update samples
* add file
* update readme with onesignal (#12126)
* [typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true
* [typescript-fetch] update samples
* [kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
* [python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it
* Adds missing schema definitions
* Skips fromProperty invocation if the passed in schema is none in getContent
* Makes MediaType.schema optional
* Adds checking that the content type is in self.content
* Sets ApiResponse body type as Unset if there is no schema for it
* Handles schema = None case
* Adds endpoint without response schema
* Reverts version files
* Adds test_response_without_schema
* improve errorObjectType to avoid regression (#12131)
* [php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates
* Remove default values from DI\get helper
It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.
* Refresh samples
* Bump async from 2.6.3 to 2.6.4 in /website (#12148)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* do not put the invalid value of the enum to a JSON structure (#12133)
* [Java] Ignore return value for Java file assert classes (#12145)
* Add @mkusaka to TS technical committee (#12150)
* Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
* [Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples
Co-authored-by: 0xnf <0xnf>
* [dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs
* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options
* [dart] Delete old generator doc files
* [Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support
* Remove redundant params_encoder config
* Memoize Faraday connection and refactor
* [Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.
Squashed commit of the following:
commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 18:22:54 2022 +0200
Polishing
commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:15:28 2022 +0200
Add JavaDoc
commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 17:11:17 2022 +0200
Add imports for inherited Properties
commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:40:36 2022 +0200
Generate Samples
commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Thu Apr 7 13:21:23 2022 +0200
SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.
commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Thu Apr 7 07:18:50 2022 +0200
Add allVars to omit list in OneOfImplementorAdditionalData
commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 16:40:23 2022 +0200
Works exactly as needed for oneOf/allOf in Java/Spring
commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Wed Apr 6 15:16:27 2022 +0200
Debug Session: identify critical codep path
commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date: Tue Apr 5 09:56:38 2022 +0200
Add test case to reproduce issue.
commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date: Tue Apr 5 06:57:30 2022 +0200
Add config to reproduce the issue
* Adjust indentation.
Co-authored-by: Lars Uffmann <lars@wintermute.local>
* [REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option
Implementation of #10028
* regenerated clients
* set follow_location default to true
* Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* update url to travis ci
* Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
* [python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint
* Regenerates samples
* Fixes singleton repr, removes issue components and endpoint
* Removes unused endpoint
* Reverts file
* Adds tests of enum, boolean, and none representations
* Uses super repr for singletons that ere not none, true, or false
* [swift5] Abstract away URLSession (#11651) (#12110)
* [Java][OkHTTP] fix empty request body handling (#12172)
* Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
* [Inline model resolver] minor enhancements/refactoring (#12175)
* better code format
* better code format, minor refactor
* [python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison
* Reverts file
* [php] make ObjectSerializer::toString actually return a string (#12158)
* update php samples
* Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation
* fix typo in pom.xml
* fix typo in pom.xml, update samples
* add exception when incorrect MP Rest Client version is chosen
* [Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0
* minor format change
* update samples
* Return type for Azure funcs (#12115)
* Azure func return type
* Changed to Task<IActionResult<T>
* Readme
* update doc
* Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator
* update samples
* update doc, samples
* [java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.
This change adds support for using the Optional wrapper for non-required
properties.
* update java samples
* [typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function
* [typescript-fetch] update samples
* [typescript-fetch] refactoring initFnction apply
* [typescript-fetch] update samples
* [typescript-fetch] refactoring create body function
* [typescript-fetch] update samples
* [typescript-fetch] make interface more flexible
* [typescript-fetch] update samples
* [typescript-fetch] support 2.x version of typescript & update samples
* [typescript-axios] update samples
* [typescript-fetch] refactor: add type alias
* [typescript-fetch] override with init params even if initOverrides is function
* [typescript-fetch] update samples
* [Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation
* add option to use specified operationId
* update samples
* update cli description
* [python-flask] Fix return type too strict (#12190)
Flask (and connexion by extension) allows the return type to be either
just the body, or the body & status code, or the body & status code &
headers.
This commit fixes the stated `rtype` to allow the latter two cases.
* update samples, docs
* Fixing bug in Kotlin Client with BigDecimal default value (#12213)
* Fix duplication of "Api" when structPrefix is set (#12128)
This fixes a minor duplication of the word "Api", which is already part
of the classname template parameter and doesn't need to be repeated when
structPrefix is set.
* add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
* remove spring-mvc samples (#12222)
* [Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators
* Add support for security roles in micronaut server generator
* Micronaut Server Generator refactor the x-roles String variable
* Add support for Micronaut HttpResponse wrapper
* Generate samples
* Optimize the usage of context-path for Micronaut server
* Emit default values for aspnetcore 3 value types (#11280)
Fixes#10772 for aspnetcore 3+
This allows numbers to be set to zero, and booleans to be set to false.
It may make sense to port this fix to the other C# generators,
though it was partially fixed (for booleans only) in the netcore client in PR9042.
* update samples
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Tom Bärwinkel <dev@baerwinkel.org>
Co-authored-by: Anton Koscejev <koscejev@users.noreply.github.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
Co-authored-by: Eric Wolf <1983821+typetetris@users.noreply.github.com>
Co-authored-by: 0xNF <0xNF@users.noreply.github.com>
Co-authored-by: Yohei Kitamura <ykitamura@mdsol.com>
Co-authored-by: cachescrubber <5127753+cachescrubber@users.noreply.github.com>
Co-authored-by: Lars Uffmann <lars@wintermute.local>
Co-authored-by: Connor Moore <cmoore@aurorasolar.com>
Co-authored-by: leszek-s <1277962+leszek-s@users.noreply.github.com>
Co-authored-by: fengelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
Co-authored-by: Andrii Serkes <74911628+aserkes@users.noreply.github.com>
Co-authored-by: Abrhm7786 <82376602+Abrhm7786@users.noreply.github.com>
Co-authored-by: Auke Schrijnen <auke-@users.noreply.github.com>
Co-authored-by: adessoDpd <83429301+adessoDpd@users.noreply.github.com>
Co-authored-by: Oliver Ford <dev.github@ojford.com>
Co-authored-by: Johan Sjöblom <sjoblomj88@gmail.com>
Co-authored-by: Noah Fontes <noah.fontes@puppet.com>
Co-authored-by: Andriy Dmytruk <80816836+andriy-dmytruk@users.noreply.github.com>
Co-authored-by: matt beary <1661988+hauntingEcho@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andriy-dmytruk@wing328