json-schema-to-typescript icon indicating copy to clipboard operation
json-schema-to-typescript copied to clipboard

The key property named deprecated is wrong behavior

Open miyaji255 opened this issue 1 year ago • 1 comments

I Cannot generate OpenAPI v3.1.0 types from json schema.

https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.1/schema.json

> curl https://spec.openapis.org/oas/3.1/schema/2022-10-07 | pnpm json2ts > ./src/openapi/OpenAPIV31.d.ts
[
  'Error at key "properties" in file "undefined": deprecated must be a boolean'
]
[
  'Error at key "properties" in file "undefined": deprecated must be a boolean'
]
[
  ValidationError
      at C:\Users\user\Documents\workspace\hono-typia-openapi\node_modules\.pnpm\[email protected]\node_modules\json-schema-to-typescript\dist\src\index.js:97:19
      at Generator.next (<anonymous>)
      at fulfilled (C:\Users\user\Documents\workspace\hono-typia-openapi\node_modules\.pnpm\[email protected]\node_modules\json-schema-to-typescript\dist\src\index.js:5:58)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
]

miyaji255 avatar Sep 01 '24 05:09 miyaji255

Just here to say that I'm running into the exact same problem. It's surprising that a type definition for OpenAPI isn't more available on the internet.

dwjohnston avatar Feb 21 '25 04:02 dwjohnston