You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that whenever there is an apostrophe in an enum, the generator does not escape it in the types. The result is that the syntax of types.gen.ts is wrong.
Reproducible example or configuration
Using this dummy openapi file to generate the API :
openapi: 3.0.0info:
title: Hey API Generator example with apostrophdescription: Minimal reproductible openapi file for the non-escaped apostroph in the generated types.version: 0.0.1paths:
/users:
get:
responses:
"200":
description: A JSON array of user namescontent:
application/json:
schema:
type: stringenum:
- "test1"
- "test'2"
Description
Hello,
I noticed that whenever there is an apostrophe in an enum, the generator does not escape it in the types. The result is that the syntax of types.gen.ts is wrong.
Reproducible example or configuration
Using this dummy openapi file to generate the API :
With this configuration :
Produces this types.gen.ts file
OpenAPI specification (optional)
No response
System information (optional)
Deps :
Dev deps :
The text was updated successfully, but these errors were encountered: