-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[BUG] Omitted fields are incorrectly set in snake-case #23380
Copy link
Copy link
Open
Labels
Description
I have generated a React/TS client with openapi-generator.
The API is served by Django and Django REST Framework.
Django==4.2.6
drf-spectacular==0.28.0
djangorestframework==3.16.1
and
"@openapitools/openapi-generator-cli": "2.31.0",
I have noticed a bug in the generation:
The request definitions, adds a list of Omitted fields (which are the ones noted as read_only on the Django REST framework side).
However those fields are incorrectly in snake-case,
export interface CatalogMissionsCreateRequest {
mission: Omit<Mission, 'id'|'single_car'>;
format?: CatalogMissionsCreateFormatEnum;
}
export interface Mission {
/**
*
* @type {string}
* @memberof Mission
*/
readonly id: string;
/**
*
* @type {string}
* @memberof Mission
*/
name: string;
/**
*
* @type {Car}
* @memberof Mission
*/
readonly singleCar: Car;
}
Reactions are currently unavailable