Package Exports
- openapi3-ts
- openapi3-ts/dist/cjs/index.js
- openapi3-ts/dist/mjs/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openapi3-ts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenApi3-TS
TypeScript library to help building OpenAPI 3.x compliant API contracts.
Version 4
Breaking change notice:
Version 4.0 Adds explicit support for OAS 3.0 and OAS 3.1 as separate implementations.
To use version 3.1
From Typescript you can consume it from the library:
import { oas31 } from "openapi3-ts";Or directly from sources:
import { OpenAPIObject } from "openapi3-ts/src/model/openapi31";
import { OpenApiBuilder } from "openapi3-ts/src/dsl/openapi-builder31";From a JavaScript application you can import:
import { oas31 } from 'openapi3-ts';To use version 3.0 import
From Typescript you can consume it from the library:
import { oas30 } from "openapi3-ts";Or directly from the sources:
import { OpenAPIObject } from "openapi3-ts/src/model/openapi30";
import { OpenApiBuilder } from "openapi3-ts/src/dsl/openapi-builder30";From a JavaScript application you can import:
import { oas30 } from "openapi3-ts";Includes
/src/modelTS typed interfaces for helping building a contract./src/dslFluent DSL for building a contract.
Install
Install package via npm:
npm i --save openapi3-tsVersions and Changelog
See changelog.
References
- OpenAPI spec 3.1.0. https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md
License
Licensed under the MIT License.
Credits
Contact: Pedro J. Molina | github: pjmolina | twitter: pmolinam
(c) 2017-2023. Pedro J. Molina at Metadev S.L. https://metadev.pro & contributors.
