A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/geut/openapi-box below:

geut/openapi-box: Generate TypeBox schemas from your openapi.

Generate TypeBox types from OpenApi V3 IDL + End-to-end typesafe HTTP client library.

It works for TypeScript and JavaScript.

$ npm install @geut/openapi-box @sinclair/typebox
  1. Generate the schema from an OpenApi url (it can a be filepath too):
$ openapi-box https://petstore3.swagger.io/api/v3/openapi.json
  1. Load your schemas into the End-to-end typesafe fetch client:
import { schema } from './schema.js'
import { createClient } from './src/client.js'

const client = createClient({
  schema,
  baseUrl: 'https://petstore.swagger.io/v2'
})
  1. Enjoy your types + validations out of the "box" 😉:

🐛 If you found an issue we encourage you to report it on github. Please specify your OS and the actions to reproduce it.

👥 Ideas and contributions to the project are welcome. You must follow this guideline.

MIT © A GEUT project


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4