Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

swagger-to-flowtype

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-to-flowtype - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "swagger-to-flowtype",
"version": "0.0.3",
"version": "0.0.4",
"description": "Command line tool for generating flow types from swagger",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -15,10 +15,75 @@ # swagger-to-flowtype

`-d option` can specify the path of generated file
This command generates a file named **flowtype.js** includes type definitions as default.
You can also specify output path with `-d option`.
`$swagger-to-flowtype <YOUR SWAGGER FILE> -d <OUTPUT FILE PATH>`
## Example
swagger file like following
```yaml
...
definitions:
Order:
type: "object"
properties:
id:
type: "integer"
format: "int64"
petId:
type: "integer"
format: "int64"
quantity:
type: "integer"
format: "int32"
shipDate:
type: "string"
format: "date-time"
status:
type: "string"
description: "Order Status"
enum:
- "placed"
- "approved"
- "delivered"
complete:
type: "boolean"
default: false
xml:
name: "Order"
Category:
type: "object"
properties:
id:
type: "integer"
format: "int64"
name:
type: "string"
xml:
name: "Category"
...
```
Output will be like below
```js
// @flow
export type Order = {
id: number,
petId: number,
quantity: number,
shipDate: string,
status: string,
complete: boolean
};
export type Category = { id: number, name: string };
```
## Requirements
*Write later.*
**Node 4+ is required**

@@ -29,2 +94,1 @@ ## Tests

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc