mirror of
https://github.com/ritz078/transform.git
synced 2026-11-22 00:54:01 +03:00
add json schema to rust serde (#56)
* add json schema to rust serde * fixes * fixes
This commit is contained in:
1 parent
5d11840f16
commit
b690634565
7 files changed
+217
-59
No files matched your search
@@ -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
|
||||
@@ -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.'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user