bcherny/json-schema-to-typescript

The key property named deprecated is wrong behavior

Open

#626 geöffnet am 1. Sept. 2024

Auf GitHub ansehen
 (1 Kommentar) (6 Reaktionen) (0 zugewiesene Personen)TypeScript (449 Forks)github user discovery
bughelp wanted

Repository-Metriken

Stars
 (3.302 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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\json-schema-to-typescript@15.0.1\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\json-schema-to-typescript@15.0.1\node_modules\json-schema-to-typescript\dist\src\index.js:5:58)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
]

Contributor Guide