0.3.0 • Published 6 years ago

openapi3-flowtype-definition v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

OpenAPI3-FlowType-definition

Build Status

This repo contains Flowtype annotations for the OpenAPI 3.0 JSON format. Annotation is generatoed by json-schema-to-flow-type from OAI/OpenAPI-Specification #1236

note: OAI/OpenAPI-Specification #1270 - Alternative OAS3 JSON Schema

install

npm install --save-dev openapi3-flowtype-definition

or

yarn add --dev openapi3-flowtype-definition

Example

yarn init
yarn add -D babel-cli babel-preset-flow flow-bin
echo '{"presets": ["flow"]}' > .babelrc
// @flow
// index.js
import type { OpenAPI } from 'openapi3-flowtype-definition'

const openAPI: OpenAPI = {
  openapi: '3.0',
  info: {
    title: 'test',
    version: '0.1',
  },
  paths: {},
}

console.log(JSON.stringify(openAPI))

you typecheck and generate json

yarn flow && babel-node index.js

Links

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago