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

oneOf Polymorphism Broken #333

Open
cjllanwarne opened this issue Aug 15, 2022 · 0 comments
Open

oneOf Polymorphism Broken #333

cjllanwarne opened this issue Aug 15, 2022 · 0 comments
Labels

Comments

@cjllanwarne
Copy link

Describe the bug

To Reproduce:

Generate the oneOf example given in the openapi docs here: https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/

Expected Behavior:

The example inputs should work.

Actual Behavior:

An error is thrown in the service:

Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Could not resolve subtype of [simple type, class [...].PetsBody]: missing type id property 'type'; nested exception is com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve subtype of [simple type, class [...].PetsBody]: missing type id property 'type'<EOL> at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 4, column: 1]]

Environment

Plugin version: 2.19.2
Swagger Codegen version: 2.19.2
Gradle version:
Java version: 17
OS:

@cjllanwarne cjllanwarne changed the title oneOf Molymorphism Broken oneOf Polymorphism Broken Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant