@json-schema-tools/meta-schema
Advanced tools
Comparing version 1.6.18 to 1.6.19
{ | ||
"name": "@json-schema-tools/meta-schema", | ||
"version": "1.6.18", | ||
"version": "1.6.19", | ||
"description": "JSON Schema Meta Schema & Generated types for typescript, rust, golang and python", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,2 +15,7 @@ # JSON Schema Meta Schema | ||
### Rust | ||
`cargo install json_schema` | ||
## Using | ||
@@ -23,6 +28,27 @@ | ||
### | ||
### Rust | ||
#### From a string | ||
```rust | ||
let foo = r#"{ | ||
"title": "helloworld", | ||
"type": "string" | ||
}"#; | ||
let as_json_schema: JSONSchemaObject = serde_json::from_str(foo).unwrap(); | ||
``` | ||
#### Using builder pattern | ||
```rust | ||
let schema = JSONSchemaObjectBuilder::default() | ||
.title("foobar".to_string()) | ||
._type(Type::SimpleTypes(SimpleTypes::String)) | ||
.build() | ||
.unwrap(); | ||
let as_str = serde_json::to_string(&schema).unwrap(); | ||
``` | ||
### Contributing | ||
How to contribute, build and release are outlined in [CONTRIBUTING.md](CONTRIBUTING.md), [BUILDING.md](BUILDING.md) and [RELEASING.md](RELEASING.md) respectively. Commits in this repository follow the [CONVENTIONAL_COMMITS.md](CONVENTIONAL_COMMITS.md) specification. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31884
53