[BUG] Any isSomething field is serialized incorrectly in Kotlin generator
See original GitHub issueBug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue?
-
Have you validated the input using an OpenAPI validator (example)?
-
What’s the version of OpenAPI Generator used? openapi: 3.0.1
-
Have you search for related issues/PRs? yes
-
What’s the actual output vs expected output? expected - it will generate correct API actual output is
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 1, Warning count: 1
Errors:
-attribute paths.'/v1/{uuid}'.[['unknown']].in is missing
Warnings:
-attribute paths.'/v1/{uuid}'.[['unknown']].in is missing
at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:480)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:507)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:423)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:61)
- [Optional] Bounty to sponsor the fix (example)
Description
openapi-generator version
openapi: 3.0.1
OpenAPI declaration file content or url
https://gist.github.com/mishin/31fc9ae2b0d4acd79fc668fded257c41
Command line used for generation
./gradlew 'generate all'
openapi-generator-cli generate -g kotlin -i /src/main/resources/openapi/api.yaml -o /var/tmp/kotlin3/
return
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 1, Warning count: 1
Errors:
-attribute paths.'/v1/{uuid}'.[['unknown']].in is missing
Warnings:
-attribute paths.'/v1/{uuid}'.[['unknown']].in is missing
at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:480)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:507)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:423)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:61)
Steps to reproduce
Related issues/PRs
Suggest a fix
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
kotlinx.serialization.MissingFieldException: Error in kotlin
Looks that some of the items in your JSON doesn't contain the words field and since you don't accept the val words: List<CommonWords>...
Read more >Groovy Language Documentation
2.5. groovydoc, the Groovy & Java documentation generator ... Any indentation would yield a compilation error. ... Incorrect computation result.
Read more >Management & Monitoring - Micronaut Documentation
Introspections on fields are not possible in Kotlin because it is not possible to declare fields directly. Constructor Methods. For classes with multiple ......
Read more >MessagePack: It's like JSON. but fast and small.
MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller.
Read more >userguide.pdf - Gradle User Manual
if you're given a Gradle build without any instructions? ... See the full compatibility notes for Java, Groovy, Kotlin and Android.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👍 Thanks for opening this issue! 🏷 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
close because fixed https://github.com/FasterXML/jackson-module-kotlin/issues/346