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
getType() is ignored for JupyterNotebookBean
The the autogenerated serialization code replaces the discriminator value urn:jupyter-notebook-0.1 with the schema type name JupyterNotebook.
This used to work in earlier iterations. So it is something I've broken recently.
....
executable:
type: "JupyterNotebook"
....
Related to the template code generated by OpenAPI.
....
@Schema(name = "AbstractExecutable", description = "Abstract base class for executables.")
@JsonIgnoreProperties(
value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the type to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = IvoaBinderNotebook.class, name = "urn:binder-notebook-0.1"),
@JsonSubTypes.Type(value = IvoaDockerContainer.class, name = "urn:docker-container-0.1"),
@JsonSubTypes.Type(value = IvoaJupyterNotebook.class, name = "urn:jupyter-notebook-0.1"),
@JsonSubTypes.Type(value = IvoaRepo2DockerContainer.class, name = "urn:repo2docker-0.1"),
@JsonSubTypes.Type(value = IvoaSingularContainer.class, name = "urn:singular-container-0.1")
})
....
@JsonIgnoreProperties(
value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the {{{discriminator.propertyBaseName}}} to be set during deserialization
)
getType()
is ignored forJupyterNotebookBean
The the autogenerated serialization code replaces the discriminator value
urn:jupyter-notebook-0.1
with the schema type nameJupyterNotebook
.This used to work in earlier iterations. So it is something I've broken recently.
Related to the template code generated by OpenAPI.
Generated annotation comes from this template:
https://github.com/OpenAPITools/openapi-generator/blob/2838b9584b3adf0e8a5114f7c287561f4d8e068b/modules/openapi-generator/src/main/resources/Java/typeInfoAnnotation.mustache#L3-L6
Related issues
[BUG][JAVA] discriminator ignored during serialization #12777
OpenAPITools/openapi-generator#12777
BUG][JAVA] Error in serialization of object lists with polymorphism #18460
OpenAPITools/openapi-generator#18460
[BUG] [SPRING] legacyDiscriminatorBehavior property is always ignored #12692
OpenAPITools/openapi-generator#12692
The text was updated successfully, but these errors were encountered: