openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG] [typescript-fetch] Readonly properties are being Omitted in the wrong case

Open neon-john opened this issue 1 year ago • 0 comments

Description

The generator emits objects with camelCase properties, but in cases where they should be omitted for being readonly, it omits them by snake_case, which is incorrect.

The issue was introduced in this change: Omit readOnly properties from request models

The problem is visible in the sample output: https://github.com/OpenAPITools/openapi-generator/blob/master/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts#L73

Name has a property snakeCase, but the generator outputs Omit<Name, "snake_case">.

openapi-generator version

7.5.0

neon-john avatar May 07 '24 00:05 neon-john