openapi-flowtype-definition

1.0.1 • Public • Published

OpenAPI 2.0 Flowtype definition

This repo contains Flowtype annotations for the OpenAPI 2.0 (or Swagger 2.0) JSON format. It uses exact object types for each specified OpenAPI object and doesn't allow vendor extensions.

Install

npm i --save-dev openapi-flowtype-definition

or

yarn add --dev openapi-flowtype-definition

How to use

Assuming that your project is set up with Flowtype, import the type whenever you need to type check a JS object containing the OpenAPI definition:

import type { OpenAPI } from 'openapi-flowtype-definition';

const api: OpenAPI = {
  swagger: "2.0",
  // etc...
}

See the example under ./example for more examples.

Readme

Keywords

none

Package Sidebar

Install

npm i openapi-flowtype-definition

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • albertbrand