add json schema to rust serde (#56)

* add json schema to rust serde

* fixes

* fixes
This commit is contained in:
Ritesh Kumar authored and GitHub committed 2017-09-17 04:02:36 +05:30
1 parent 5d11840f16
commit b690634565
7 files changed
+217 -59

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
const json = `{
"title": "Example Schema",
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"age": {
"description": "Age in years",
"type": "integer",
"minimum": 0
},
"height": {
"type": "number"
},
"favoriteFoods": {
"type": "array",
"minItems": 0,
"maxItems": 2,
"items": {
"type": "string"
}
},
"likesDogs": {
"type": "boolean"
}
},
"required": ["firstName", "lastName"]
}`
export default json
+5
View File
@@ -100,6 +100,11 @@ export const categorizedRoutes = [
label: 'JSON to Rust Serde',
path: '/json-to-rust-serde',
desc: 'An online REPL for converting JSON to Rust Serde Structs.'
},
{
label: 'JSON Schema to Rust Serde',
path: '/json-schema-to-rust-serde',
desc: 'An online REPL for converting JSON Schema to Rust Serde Structs.'
}
]
},