Crates.io | json_schema |
lib.rs | json_schema |
version | 1.7.5 |
source | src |
created_at | 2021-05-27 00:47:45.501835 |
updated_at | 2024-05-07 08:37:45.277347 |
description | Generated types based on the JSON-Schema for json_schema |
homepage | |
repository | |
max_upload_size | |
id | 402449 |
size | 515,362 |
This repo contains the json schema meta schema and code to package it on npm, generate typings, etc.
npm install --save @json-schema-tools/meta-schema
go get github.com/json-schema-tools/meta-schema
cargo install json_schema
import JSONSchema, { JSONSchemaObject, Properties, Items } from "@json-schema-tools/meta-schema"
let foo = r#"{
"title": "helloworld",
"type": "string"
}"#;
let as_json_schema: JSONSchemaObject = serde_json::from_str(foo).unwrap();
let schema = JSONSchemaObjectBuilder::default()
.title("foobar".to_string())
._type(Type::SimpleTypes(SimpleTypes::String))
.build()
.unwrap();
let as_str = serde_json::to_string(&schema).unwrap();
How to contribute, build and release are outlined in CONTRIBUTING.md, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.