Socket
Socket
Sign inDemoInstall

@json-schema-tools/meta-schema

Package Overview
Dependencies
0
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @json-schema-tools/meta-schema

JSON Schema Meta Schema & Generated types for typescript, rust, golang and python


Version published
Weekly downloads
27K
decreased by-13.4%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

1.7.4 (2024-04-11)

Bug Fixes

Readme

Source

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

import JSONSchema, { JSONSchemaObject, Properties, Items } from "@json-schema-tools/meta-schema"

Rust

From a string
let foo = r#"{
    "title": "helloworld",
    "type": "string"
}"#;

let as_json_schema: JSONSchemaObject = serde_json::from_str(foo).unwrap();
Using builder pattern
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, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.

FAQs

Last updated on 11 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc