openapi-form-generator
TypeScript icon, indicating that this package has built-in type declarations

0.0.3-d • Public • Published

FormBuilder

npm version

How to use:

Install

npm i openapi-form-generator

OR

yarn add openapi-form-generator

Add Props

<FormBuilder
    openApiOptions={{
        //Handle Response
        //Optional, but Recommended
        onResponseReceived: (data, response) => { 
            console.log(data); //Response Data Object
            console.log(response); //Full Response with Headers + Status + Status Code
        },

        //Where to find the json file        
        src: '/my/api/v1/swagger.json', 
        baseUrl: 'http://api.website.com/', 
        path: '/api/path/as/in/paths/of/json'
    }}
    
    //Useful for seeing Full Request/Response (Remove in production) 
    debug     
    //TODO: check NODE_ENV if production
/>

🌟Done!🌟

What does it use?:

Form Structure:

<form class="form">
    <div class="field">
        <label class="label"></label>
        <input class="input" /> OR <textarea class="textarea"></textarea>
    </div>
    <br />
    <button class="button"></button>
</form>

Contribution:

To start developing, run:

npm t

OR

npm test

This will run a test server for the test-app folder with hot-reloading etc.

Readme

Keywords

Package Sidebar

Install

npm i openapi-form-generator

Weekly Downloads

3

Version

0.0.3-d

License

MIT

Unpacked Size

168 kB

Total Files

76

Last publish

Collaborators

  • chaosren
  • dusty.roberts