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
TypeScript is treating the numeric status codes as invalid TypeScript and is throwing error when wildcard status codes like 5XX are used. You can see the output and errors in the TypeScript playground.
Response codes should probably be strings. The spec states that the responses objects keys should always be quoted.
This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299].
It seems like the spec really intends for this to be a string. Searching around I think this might have been introduced in #381?
Description
TypeScript is treating the numeric status codes as invalid TypeScript and is throwing error when wildcard status codes like
5XX
are used. You can see the output and errors in the TypeScript playground.openapi-typescript
6.10.0
- fromnpx
16.16.x
macOS 12
Reproduction
5xx
status codeExpected result
Response codes should probably be strings. The spec states that the responses objects keys should always be quoted.
It seems like the spec really intends for this to be a string. Searching around I think this might have been introduced in #381?
Checklist
The text was updated successfully, but these errors were encountered: