@scalar/openapi-types
v0.8.0
Published
Modern OpenAPI types
Readme
Scalar OpenAPI Types
Strict, well-documented OpenAPI TypeScript types based on official JSON Schemas, with specification links in comments.
Installation
npm add @scalar/openapi-typesVersions
- OpenAPI 3.2
- OpenAPI 3.1
- OpenAPI 3.0
- Swagger 2.0
Usage
import type { Document } from '@scalar/openapi-types/3.2'
const file: Document = {
openapi: '3.2.0',
info: {
title: 'Hello World',
version: '1.0.0',
},
paths: {},
}Individual Exports
If your bundler doesn't work with barrel files, you can explicitly import objects, too:
import type { Document } from '@scalar/openapi-types/3.2/document'
const file: Document = {
openapi: '3.2.0',
info: {
title: 'Hello World',
version: '1.0.0',
},
paths: {},
}Community
We are API nerds. You too? Let's chat on Discord: https://discord.gg/scalar
License
The source code in this repository is licensed under MIT.
