Add response=sealed|plain mode for OpenAPI client generation#622
Open
dsudomoin wants to merge 1 commit intokora-projects:masterfrom
Open
Add response=sealed|plain mode for OpenAPI client generation#622dsudomoin wants to merge 1 commit intokora-projects:masterfrom
dsudomoin wants to merge 1 commit intokora-projects:masterfrom
Conversation
When response=plain is set, client methods return success type directly instead of sealed interface wrapper. Error responses throw exceptions: - HttpClientDecodedResponseException for errors with described schemas - HttpClientResponseException.fromResponse() for unmatched errors Falls back to sealed mode when 2xx responses have different data types. Changes: - Add HttpClientDecodedResponseException in http-client-common - Add ResponseStyle enum and response CLI option to CodegenParams - Add plain response vendor extensions in KoraCodegen.postProcessOperationsWithModels - Update Java/Kotlin ApiResponseGenerator to skip plain response operations - Update Java/Kotlin ClientApiGenerator for plain return types - Update Java/Kotlin ClientResponseMapperGenerator with PlainResponseMapper - Add petstoreV3_plain_response.yaml test spec and plainResponse test option Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
@GoodforGod @Squiry я переписал короче под 2.0 все это дело, теперь мусташа нет |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
response=plain, client methods return success type directly instead of sealed interfaceHttpClientDecodedResponseException(typed body) orHttpClientResponseException(raw)Changes
HttpClientDecodedResponseException+ protected constructor inHttpClientResponseExceptionResponseStyleenum,responseCLI option, plain response vendor extensionsApiResponseGenerator,ClientApiGenerator,ClientResponseMapperGeneratorpetstoreV3_plain_response.yamlspec +plainResponseoptionSupersedes #615 (was targeting 1.0, rewritten for master/2.0.0).
🤖 Generated with Claude Code