New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

openapi3-flowtype-definition

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi3-flowtype-definition

[![Build Status](https://travis-ci.com/eiel/openapi3-flowtype-definition.svg?branch=master)](https://travis-ci.com/eiel/openapi3-flowtype-definition)

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

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

Keywords

OpenAPI

FAQs

Package last updated on 19 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts