A JSON schema utility for Flatmarket.
npm install flatmarket-schema
var schema = require('flatmarket-schema')
var validation = schema.validate(yourObj)
validation.value // the result (with defaults populated)
validation.error // the error (`null` if `yourObj` is valid)
This is the root object for the specification.
Defines additional data about the store.
Field Name |
Type |
Description |
name |
String |
Required. |
description |
String |
|
Field Pattern |
Type |
Description |
^x- |
Any |
|
Defines a product. In addition to the subset specified below, can contain the types specified in Stripe Object (these values will override the global Stripe configuration).
Field Name |
Type |
Description |
amount |
Number |
Required. |
description |
String |
|
images |
[String] |
|
metadata |
Any |
|
name |
String |
|
plan |
String |
|
Field Pattern |
Type |
Description |
^x- |
Any |
|
Defines the Flatmarket server configuration.
Field Name |
Type |
Description |
host |
String |
Required. |
pathname |
String |
|
Defines the global Stripe configuration. Values can be overriden by individual Product Objects.
Field Name |
Type |
Description |
allowRememberMe |
Boolean |
|
billingAddress |
Boolean |
|
bitcoin |
Boolean |
|
capture |
Boolean |
|
currency |
String |
|
image |
String |
|
name |
String |
|
panelLabel |
String |
|
publishableKey |
String |
Required. |
receiptEmail |
Boolean |
|
shippingAddress |
Boolean |
billingAddress must be set to true . |
zipCode |
Boolean |
|
See LICENSE.