Code generation issue with stream_mode field using anyOf #64
Unanswered
Nicolas Peulvast (peulvast)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team!
I encountered a compilation error when generating Java server stubs from the agent-protocol OpenAPI specification using the jaxrs-spec generator (OpenAPI Generator version 7.16.0).
The stream_mode field in the Run > RunStream schemas uses an anyOf structure with a default value:
The generator incorrectly interprets the default value "values" as a variable name rather than a string literal, producing:
Workaround I've found so far ...
I simplified the definition to use a direct reference without anyOf and removed the default value:
Question
Is there a recommended way to define a field that can accept either a single enum value or an array of enum values with a default value, that works correctly with the jaxrs-spec generator?
Or should the specification be updated to avoid this pattern?
Thanks,
Nicolas
Beta Was this translation helpful? Give feedback.
All reactions