0.3.3 • Published 2 years ago

openapi-formkit v0.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

OpenAPI FormKit

Transform an OpenAPI document to a FormKit schema

WARNING: This package is still under development.
Implemented:

  • Basic types:
    • Booleans
    • Numbers
      • Float
      • Integer
    • String
      • text
      • file
      • special: telephone, email, url, date/date-time, password
    • Object

Not implemented:

  • anyOf keyword
  • oneOf keyword
  • allOf keyword
  • not keyword
  • And more

import { Convert } from 'openapi-formkit'    

// Helper function to convert from url or file openapi document  
Convert(<url/path>, options)

Or

import { Converter } from 'openapi-formkit'    

// Convert a JS object representating a dereferenced OpenAPI document  
new Converter(options).convert(object)

Return a promise with the result.


Options:

  • step: Default step for number and range inputs
    • default : 0.1
  • transformers: List of transformer function which apply to every parameters/object fields
    • default :
    • definition :
(param: Parameter, options: Options, item: FormKitItem) => FormKitItem
(path: string, op: method, options: Options, item: Route) => Route

Passed arguments to a transformer function:

  • OpenAPI parameter or object field
  • The options passed to the converter
  • The item to transform
0.0.18

2 years ago

0.1.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.8

2 years ago

0.3.2

2 years ago

0.2.3

2 years ago

0.3.1

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.3.3

2 years ago

0.2.4

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago