https://github.com/json-schema-tools/meta-schema
JSON Schema meta schema + Type aliases for multiple languages
https://github.com/json-schema-tools/meta-schema
json-schema types
Last synced: about 1 month ago
JSON representation
JSON Schema meta schema + Type aliases for multiple languages
- Host: GitHub
- URL: https://github.com/json-schema-tools/meta-schema
- Owner: json-schema-tools
- License: apache-2.0
- Created: 2020-01-28T02:13:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-21T00:47:00.000Z (4 months ago)
- Last Synced: 2025-04-11T21:02:44.000Z (about 1 month ago)
- Topics: json-schema, types
- Language: Go
- Homepage:
- Size: 44 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# JSON Schema Meta Schema
This repo contains the json schema meta schema and code to package it on npm, generate typings, etc.
## Installing
### Typescript
`npm install --save @json-schema-tools/meta-schema`
### Golang
`go get github.com/json-schema-tools/meta-schema`
### Rust
`cargo install json_schema`
## Using
### Typescript
```typescript
import JSONSchema, { JSONSchemaObject, Properties, Items } from "@json-schema-tools/meta-schema"
```### 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.