-
Notifications
You must be signed in to change notification settings - Fork 0
Improve language handling #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f24e161
39deb9a
8072b67
2dce499
9338667
c1305ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| "generator-cli": { "version": "7.21.0" } | ||
| "generator-cli": { "version": "7.22.0" } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package org.openapitools.configuration | ||
|
|
||
| import org.openapitools.model.Language | ||
| import org.springframework.context.annotation.Bean | ||
| import org.springframework.context.annotation.Configuration | ||
| import org.springframework.core.convert.converter.Converter | ||
|
|
||
| /** | ||
| * This class provides Spring Converter beans for the enum models in the OpenAPI specification. | ||
| * | ||
| * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent | ||
| * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than | ||
| * `original` or the specification has an integer enum. | ||
| */ | ||
| @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") | ||
| class EnumConverterConfiguration { | ||
| @Bean(name = ["org.openapitools.configuration.EnumConverterConfiguration.languageConverter"]) | ||
| fun languageConverter(): Converter<kotlin.String, Language> = | ||
| object : Converter<kotlin.String, Language> { | ||
| override fun convert(source: kotlin.String): Language = Language.forValue(source) | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand it correctly that the language is detected based on Browser settings etc. ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's
(So now the same for GenAI as it is for the UI)