Open kostia1st opened 3 weeks ago
Having a schema like this
{ "components": { "schemas": { "400": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "Error code" }, "message": { "type": "string", "description": "User-readable message" }, "invalidFields": { "type": "object", "description": "Invalid fields", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "object", "additionalProperties": { "type": "string" } } ], "description": "Field name as key" } } } } } }
I get this
export type = { /** * Error code */ code: string; /** * User-readable message */ message: string; /** * Invalid fields */ invalidFields?: { [key: string]: (string | { [key: string]: (string); }); }; };
Config:
createClient({ client: '@hey-api/client-fetch', // This one does NOT camelize query parameters input: './openapi.json', output: './openapi-temp', exportCore: false, schemas: false, types: { name: 'PascalCase' }, });
No response
This looks more like an issue with the name itself, type is a reserved word. I'll have a look
Description
Having a schema like this
I get this
Config:
OpenAPI specification (optional)
No response
Configuration
System information (optional)
No response