Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1022 Bytes

File metadata and controls

50 lines (32 loc) · 1022 Bytes

scaffold-openapi

Generate a React app from an OpenAPI 3.1 schema URL.

Make sure your API is running before trying this

Install

Install globally from GitHub:

npm install -g github:EduMake/scaffold-openapi-react

Or run directly with npx:

npx github:EduMake/scaffold-openapi-react create http://localhost:8000/openapi.json ./my-new-app --app-name MyNewApp

Usage

scaffold-openapi create <apiUrl> <outputDir> [--app-name <name>]

Example:

scaffold-openapi create http://localhost:8000/openapi.json ./my-new-app --app-name MyNewApp

Arguments

  • create: Generate a new React app from an OpenAPI schema.
  • <apiUrl>: URL to the OpenAPI JSON document.
  • <outputDir>: Directory where the new app is generated.

Options

  • --app-name <name>: App name for generated project metadata. Defaults to generated-app.

Local development

npm install
npm run build
node dist/index.js create http://localhost:8000/openapi.json ./my-new-app