Skip to content

Instantly share code, notes, and snippets.

View KangoV's full-sized avatar

Darren Bell KangoV

  • Realistic Games Ltd
  • UK
View GitHub Profile
@KangoV
KangoV / gist:8a62886376207e281e8b0fedd008a24d
Created June 30, 2024 01:32
BUG JAVA Micronaut OpenAPI Generator - Superclass/subclass
@Serdeable
@JsonPropertyOrder({
JsonOp.JSON_PROPERTY_PATH,
JsonOp.JSON_PROPERTY_OP,
JsonOp.JSON_PROPERTY_VALUE,
JsonOp.JSON_PROPERTY_FROM
})
@Generated("io.micronaut.openapi.generator.JavaMicronautServerCodegen")
@JsonIgnoreProperties(
value = "op", // ignore manually set op, it will be automatically generated by Jackson during serialization
@KangoV
KangoV / gist:ad36a85420f7c8187a208e09fe9d4242
Created June 30, 2024 01:26
OpenAPI Java Micronaut generator inheritence bug
# json-patch schema
JsonOp:
type: object
discriminator:
propertyName: op
mapping:
add: "#/components/schemas/OpAdd"
remove: "#/components/schemas/OpRemove"
replace: "#/components/schemas/OpReplace"