You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1aca0cf
Browse filesBrowse the repository at this point in the historyBrowse files
The jaxrs-spec generator had no rendering for the useOneOfInterfaces feature: a
oneOf schema was always emitted as a pojo, even when the feature transformed it
into an interface model. This adds the missing interface template so that, with
useOneOfInterfaces=true, a oneOf schema is generated as a Java interface and the
concrete subtypes implement it.
- model.mustache routes x-is-one-of-interface models to a new oneof_interface
template; all other models still render as pojos (default behavior unchanged).
- oneof_interface.mustache emits a plain interface, carrying the discriminator
getter (whose type now resolves to the shared enum, e.g. PetType) plus the
generated/typeInfo/deduction annotations.
- Adds the oneof_interface fixture, a JavaJAXRSSpecServerCodegenTest, and a
jaxrs-spec-oneof-interface sample (registered in the JAX-RS samples workflow).
The feature stays opt-in; default jaxrs-spec output is unchanged.
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java
0 commit comments