@rapharacing/schemas
v0.0.5
Published
OpenAPI to JSON Schema to be used with middy for CC response validation
Downloads
1
Readme
Middleware Schemas
Middleware Schemas
Commands
Unfortunately quicktype-core can not infer definition files properly. It also gives useless errors for debugging InputData.
To Generate CC Schemas and Interfaces run the following commands
- Convert OpenApi to JSON Schema
$ openapi2jsonschema https://api.c616d-rapharaci1-d1-public.model-t.cc.commerce.ondemand.com/rest/v2/api-docs -o src/schemas
- Build the package
$ yarn build
How to use
import { getSchema } from "@rapharacing/mw-schemas";
const address = getSchema("address");
To do
Rewrite quicktype util to be used with other schemas (Exponea etc)