https://github.com/byu-oit/oas-ts
Typescript Definitions for OpenAPI Specification
https://github.com/byu-oit/oas-ts
investigate-possible-retirement
Last synced: about 2 months ago
JSON representation
Typescript Definitions for OpenAPI Specification
- Host: GitHub
- URL: https://github.com/byu-oit/oas-ts
- Owner: byu-oit
- Created: 2020-09-14T14:53:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-16T22:38:26.000Z (about 4 years ago)
- Last Synced: 2025-03-05T22:32:13.325Z (over 1 year ago)
- Topics: investigate-possible-retirement
- Language: TypeScript
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# oas-ts
Typescript definitions for the OpenAPI (and Swagger 2.0) specification.
## Install
```
npm i @byu-oit/oas-ts
```
## Usage
Most use cases only need to access either openapi OR swagger
```ts
import { OpenAPIObject } from '@byu-oit/oas-ts/openapi'
```
```ts
import { SwaggerObject } from '@byu-oit/oas-ts/swagger'
```
If you need to access both definitions within the same file, rename the exported object:
```ts
import * as OAS from '@byu-oit/oas-ts/openapi'
import * as Swagger form '@byu-oit/oas-ts/swagger'
```