Our great sponsors
- Appwrite - The open-source backend cloud platform
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Onboard AI - Learn any GitHub repo in 59 seconds
-
Since the OpenAPI Specification is a "machine-readable interface definition language for describing, [...] web services", and TypeScript is practically the only available type solution for Node.js, I confidently googled:
-
After an initial attempt to manually replace the $refs all around my JSON schemas, I ended up putting together a few lines to automate the process which I eventually abstracted into a JS NPM package: openapi-ts-json-schema.
-
Appwrite
Appwrite - The open-source backend cloud platform. Add Auth, Databases, Functions, and Storage to your product and build any application at any scale while using your preferred coding languages and tools.
-
json-schema-ref-parser
Parse, Resolve, and Dereference JSON Schema $ref pointers in Node and browsers
Resolve external/remote $refs and dereference them with @apidevtools/json-schema-ref-parser (resolving $ref's)
-
openapi-schema-to-json-schema
Due to the OpenAPI v3.0 and JSON Schema discrepancy, you can use this JS library to convert OpenAPI Schema objects to proper JSON Schema. (by openapi-contrib)
Convert to JSON schema with @openapi-contrib/openapi-schema-to-json-schema and openapi-jsonschema-parameters
Related posts
- is it possible to type a named function the way a arrow function is typed?
- VS Code still unable to show default value for optional function parameters after 6 years. Are you ok with that?
- Favour TypeScript Types over Interfaces
- Typescript: Validating External Data in Full Stack Applications
- What do you struggle with the most in TS?