0.3.3 • Published 3 years ago

openapi-formkit v0.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

0.1.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.8

3 years ago

0.3.2

3 years ago

0.2.3

3 years ago

0.3.1

3 years ago

0.2.2

3 years ago

0.2.5

3 years ago

0.3.3

3 years ago

0.2.4

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago