1.3.2 • Published 2 months ago

@theopenweb/schema v1.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Description

A collection of schema. Currently, no specific grouping.

Example

Add any examples to the example directory.

Format

Schema are to the schema directory. The following schema are allowed:

Usage

Install:

npm install @theopenweb/schema

If using Node.js and want perform builds, any utility functions are provided in the main index.js file.

JSDoc

/**
 *  @type {import('schema/jsdoc').Size}
 */

JSONSchema

// First convert to typescript
// CLI
// https://github.com/bcherny/json-schema-to-typescript#cli
// json2ts ./node_modules/schema/json-schema/index.json > schema.d.ts

/**
 * @type {import('schema.d.ts').definitions.Work}
 */
{
  "$schema": "http://json-schema.org/draft-07/schema",
  "definitions": {
    "MyType": {
        "$ref": "language-scripts.json#definitions/scripts"
    }
  }
}

Typing

https://www.w3.org/TR/json-ld/#typed-values

Languages

https://www.w3.org/TR/json-ld/#string-internationalization

Conversions

JSDoc => TypeScript

tsc [SOURCE] --declaration --emitDeclarationOnly --allowJs

Generated Schema

Extra Documentation

1.3.2

2 months ago

1.3.1

2 months ago

1.3.0

2 months ago

1.2.0

2 months ago

1.1.0

3 months ago

1.0.1

2 years ago

1.0.0

2 years ago