I have an OpenAPI schema that makes use of type discriminator, but that property is preserved as is and is not transformed according to the properties option.
For example, let's say the schema looks like this:
openapi: "3.1.0"
info:
title: Discriminator casing bug
version: "1.0.0"
paths: {}
components:
schemas:
CatEvent:
type: object
properties:
event_type:
type: string
const: "CAT"
full_name:
type: string
DogEvent:
type: object
properties:
event_type:
type: string
const: "DOG"
breed:
type: string
AnimalEvent:
oneOf:
- $ref: "#/components/schemas/CatEvent"
- $ref: "#/components/schemas/DogEvent"
discriminator:
propertyName: event_type
And my casing-config.yaml is simply:
In the output, event_type in the properties correctly gets transformed to eventType, but the discriminator property name is preserved as event_type, even though such property no longer exists on the schema.
The expected output is for discriminator.propertyName to also get converted to camelCase and become eventType
I have an OpenAPI schema that makes use of type discriminator, but that property is preserved as is and is not transformed according to the
propertiesoption.For example, let's say the schema looks like this:
And my
casing-config.yamlis simply:In the output,
event_typein the properties correctly gets transformed toeventType, but the discriminator property name is preserved asevent_type, even though such property no longer exists on the schema.The expected output is for
discriminator.propertyNameto also get converted to camelCase and becomeeventType