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
✨ openapi-typescript 7.0.0-next.0
(node:604330) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/home/trev/code/openapi-typescript/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:21094
Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
^
Error: Debug Failure. False expression: Negative numbers should be created in combination with createPrefixUnaryExpression
at Object.createNumericLiteral (/home/trev/code/openapi-typescript/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:21094:13)
at tsLiteral (file:///home/trev/code/openapi-typescript/packages/openapi-typescript/dist/lib/ts.js:177:60)
at Array.map (<anonymous>)
at transformSchemaObjectWithComposition (file:///home/trev/code/openapi-typescript/packages/openapi-typescript/dist/transform/schema-object.js:48:44)
at transformSchemaObject (file:///home/trev/code/openapi-typescript/packages/openapi-typescript/dist/transform/schema-object.js:6:18)
at transformSchemaObjectCore (file:///home/trev/code/openapi-typescript/packages/openapi-typescript/dist/transform/schema-object.js:269:23)
at transformSchemaObjectWithComposition (file:///home/trev/code/openapi-typescript/packages/openapi-typescript/dist/transform/schema-object.js:96:28)
at transformSchemaObject (file:///home/trev/code/openapi-typescript/packages/openapi-typescript/dist/transform/schema-object.js:6:18)
at transformMediaTypeObject (file:///home/trev/code/openapi-typescript/packages/openapi-typescript/dist/transform/media-type-object.js:7:12)
at transformRequestBodyObject (file:///home/trev/code/openapi-typescript/packages/openapi-typescript/dist/transform/request-body-object.js:15:15)
Node.js v21.7.3
Description
If an enum has a negative number, getting this error. Here is an example of a spec with one of the values
openapi-typescript
21.7.3
ubuntu 22.04
Reproduction
git clone https://github.com/lichess-org/api.git cd api/doc npm i openapi-typescript@next npx openapi-typescript specs/lichess-api.yaml -o lichess.d.ts
Checklist
npx @redocly/cli@latest lint
)The text was updated successfully, but these errors were encountered: