diff --git a/json/vape/flavoring/README.md b/json/vape/flavoring/README.md new file mode 100644 index 0000000..e1a2ac3 --- /dev/null +++ b/json/vape/flavoring/README.md @@ -0,0 +1,2 @@ +# Vape Flavoring Json Schema + diff --git a/json/vape/flavoring/flavoring-v1.schema b/json/vape/flavoring/flavoring-v1.schema new file mode 100644 index 0000000..bc0438f --- /dev/null +++ b/json/vape/flavoring/flavoring-v1.schema @@ -0,0 +1,126 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://vapesafer.info/schema/flavoring-v1.json", + "title": "Ingredient", + "description": "Flavoring used for mixing e-liquid", + "type": "object", + "properties": { + + "flavoringKey": { + "description": "Unique flavoring ID", + "type": "string" + }, + + "brandKey": { + "description": "Unique key for flavor brand", + "type": "string" + }, + + "flavoringName": { + "description": "The name of the flavoring", + "type": "string" + }, + + "brandName": { + "description": "The name of the brand", + "type": "string" + }, + + "flavoringVariant": { + "description": "The version of the flavoring if more than one variant with the same name", + "type": "string" + }, + + "attributes": { + "type": "object", + "properties": { + "specificGravity": { + "description": "The apparent specific gravity in g/mL", + "type": "number" + }, + "suggestedPercent": { + "description": "Suggested initial percent to use when mixing", + "type": "number" + }, + "suggestedSteep": { + "description": "Suggested number of days this flavoring need to steep", + "type": "integer" + }, + "base": { + "description": "The base used to carry this flavoring, like PG100", + "type": "string" + }, + "isAdditive": { + "description": "If true the flavoring is primarily an additive and not a flavor", + "type": "boolean" + }, + "isRetired": { + "description": "True if the flavoring has been retired or is no longer available", + "type": "boolean" + } + } + }, + + "flavorProfiles": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + + "ingredients": { + "description": "The ingredients that make up this ingredient", + "type": "array", + "items": { + "type": [ "string", "object" ], + "properties": { + "class": { "type":"string" }, + "ingredient": { "type":"string" }, + "percent": { + "type": [ "number", "object" ], + "properties": { + "min": { "type":"number" }, + "max": { "type":"number" } + } + }, + "isNotable": { "type": "boolean" }, + "cas": { "type": "string" }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "notes": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "uniqueItems": true + }, + + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + + "notes": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + + }, + "required": [ "flavoringKey", "brandKey", "flavoringName" ] +} diff --git a/json/vape/flavorstash/v1-example.json b/json/vape/flavorstash/examples/v1-example.json similarity index 59% rename from json/vape/flavorstash/v1-example.json rename to json/vape/flavorstash/examples/v1-example.json index 1fc2c14..d138e24 100644 --- a/json/vape/flavorstash/v1-example.json +++ b/json/vape/flavorstash/examples/v1-example.json @@ -1,5 +1,5 @@ [ { "vendor":"FA", "flavor":"Apple Pie" }, { "vendor":"FA", "flavor":"Hazelnut" }, - { "flavor":"WS-23 10%" } + { "flavor":"WS-23 10%", "extra": { "is_additive": true } } ] diff --git a/json/vape/flavorstash/v1-invalid.json b/json/vape/flavorstash/examples/v1-invalid.json similarity index 100% rename from json/vape/flavorstash/v1-invalid.json rename to json/vape/flavorstash/examples/v1-invalid.json diff --git a/json/vape/flavorstash/v1.schema b/json/vape/flavorstash/flavorstash-v1.schema similarity index 85% rename from json/vape/flavorstash/v1.schema rename to json/vape/flavorstash/flavorstash-v1.schema index f981c4e..6efb134 100644 --- a/json/vape/flavorstash/v1.schema +++ b/json/vape/flavorstash/flavorstash-v1.schema @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://schemas.noccylabs.info/json/vape/flavorstash/v1.schema", + "$id": "http://schemas.noccylabs.info/json/vape/flavorstash/flavorstash-v1.schema", "type": "array", "items": { "type": "object", diff --git a/json/vape/recipe/README.md b/json/vape/recipe/README.md new file mode 100644 index 0000000..ac8ef25 --- /dev/null +++ b/json/vape/recipe/README.md @@ -0,0 +1 @@ +# Vape Recipe Json Schema \ No newline at end of file diff --git a/json/vape/recipe/recipe-v1.schema b/json/vape/recipe/recipe-v1.schema new file mode 100644 index 0000000..147ad9a --- /dev/null +++ b/json/vape/recipe/recipe-v1.schema @@ -0,0 +1,83 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://data.vapesafer.info/schema/recipe.schema.json", + "title": "Recipe", + "description": "An e-juice recipe", + "type": "object", + "properties": { + "url": { + "description": "Original recipe URL. Should be unique and canonical", + "type": "string" + }, + "key": { + "description": "Unique identifier for this recipe. Should be slug-like and have an appropriate author prefix", + "type": "string" + }, + "recipeName": { + "description": "The name of the recipe", + "type": "string" + }, + "author": { + "description": "The author of the recipe", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "email": { "type": "string" }, + "url": { "type": "string" } + } + } + ] + }, + "license": { + "description": "The license this recipe is published under", + "type": "string" + }, + "recommendedSteep": { + "description": "The recommended number of days to steep this recipe", + "type": "integer" + }, + "type": { + "description": "Recipe type, such as experiment or clone", + "type": "string" + }, + "recipe": { + "description": "Recipe ingredients", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "vendor": { "type": "string" }, + "flavor": { "type": "string" }, + "percent": { "type": "number" }, + "optional": { "type": "boolean" }, + "subs": { + "description": "Possible substitutes for this ingredient", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "vendor": { "type": "string" }, + "flavor": { "type": "string" }, + "percent": { "type": "number" }, + "note": { "type": "string" } + } + } + } + } + }, + "note": { "type": "string" } + }, + "required": [ "flavor", "percent" ] + } + }, + "required": [ "recipeName", "recipe" ] +}