Skip to content
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

Serialization bug fix #15413

Conversation

devhl-labs
Copy link
Contributor

Small fixes to existing pr, just build samples.

@wing328 wing328 merged commit 47af002 into OpenAPITools:fix-duplicated-method May 4, 2023
@devhl-labs devhl-labs deleted the fix-duplicated-method-2 branch May 4, 2023 02:48
wing328 added a commit that referenced this pull request May 5, 2023
…type (#15377)

* better handling of oneOf/anyOf with duplicated data type

* update generichost template

* remove newline in eof

* bug fix (#15413)

---------

Co-authored-by: devhl-labs <[email protected]>
writer.WriteStartObject();

{{/isInherited}}
{{/composedSchemas.allOf}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like these 2 lines should move up to line 231 as currently we get

[pool-1-thread-2] Generation failed for csharp-netcore: (RuntimeException) Could not generate model 'apple'
java.lang.RuntimeException: Could not generate model 'apple'
	at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:569)
	at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:926)
	at org.openapitools.codegen.cmd.GenerateBatch$GenerationRunner.run(GenerateBatch.java:232)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.samskivert.mustache.MustacheParseException: Section close tag with mismatched open tag 'isInherited' != 'composedSchemas' @ line 235
	at com.samskivert.mustache.Mustache$Accumulator.requireSameName(Mustache.java:754)
	at com.samskivert.mustache.Mustache$Accumulator$2.addCloseSectionSegment(Mustache.java:705)
	at com.samskivert.mustache.Mustache$Accumulator.addTagSegment(Mustache.java:713)
	at com.samskivert.mustache.Mustache$Parser.parseChar(Mustache.java:573)
	at com.samskivert.mustache.Mustache$Parser.parse(Mustache.java:471)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filed #15424 to fix/workaround it for the time being.

please take another look when you've time.

@wing328 wing328 added this to the 6.6.0 milestone May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants