All Projects → google → Schema Dts

google / Schema Dts

Licence: apache-2.0
JSON-LD TypeScript types for Schema.org vocabulary

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Schema Dts

Jsonld
JSON-LD processor for PHP
Stars: ✭ 280 (-17.16%)
Mutual labels:  schema-org, linked-data, json-ld, semantic-web
Php Json Ld
PHP implementation of a JSON-LD Processor and API
Stars: ✭ 246 (-27.22%)
Mutual labels:  linked-data, json-ld, semantic-web
CSV2RDF
Streaming, transforming, SPARQL-based CSV to RDF converter. Apache license.
Stars: ✭ 48 (-85.8%)
Mutual labels:  linked-data, semantic-web, knowledge-graph
Topic Db
TopicDB is a topic maps-based semantic graph store (using PostgreSQL for persistence)
Stars: ✭ 164 (-51.48%)
Mutual labels:  knowledge-graph, linked-data, semantic-web
YALC
🕸 YALC: Yet Another LOD Cloud (registry of Linked Open Datasets).
Stars: ✭ 14 (-95.86%)
Mutual labels:  linked-data, semantic-web, json-ld
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 120 (-64.5%)
Mutual labels:  linked-data, json-ld, semantic-web
Web Client
Generic Linked Data browser and UX component framework. Apache license.
Stars: ✭ 105 (-68.93%)
Mutual labels:  knowledge-graph, linked-data, semantic-web
Jsonld.js
A JSON-LD Processor and API implementation in JavaScript
Stars: ✭ 1,212 (+258.58%)
Mutual labels:  linked-data, json-ld, semantic-web
LD-Connect
LD Connect is a Linked Data portal for IOS Press in collaboration with the STKO Lab at UC Santa Barbara.
Stars: ✭ 0 (-100%)
Mutual labels:  linked-data, semantic-web, knowledge-graph
awesome-ontology
A curated list of ontology things
Stars: ✭ 73 (-78.4%)
Mutual labels:  linked-data, semantic-web, knowledge-graph
LinkedDataHub
The Knowledge Graph notebook. Apache license.
Stars: ✭ 150 (-55.62%)
Mutual labels:  linked-data, semantic-web, knowledge-graph
titanium-json-ld
A JSON-LD 1.1 Processor & API
Stars: ✭ 79 (-76.63%)
Mutual labels:  linked-data, semantic-web, json-ld
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 112 (-66.86%)
Mutual labels:  linked-data, json-ld, semantic-web
twinql
A graph query language for the semantic web
Stars: ✭ 17 (-94.97%)
Mutual labels:  linked-data, semantic-web, json-ld
Rdflib
RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
Stars: ✭ 1,584 (+368.64%)
Mutual labels:  linked-data, json-ld, semantic-web
Semanticmediawiki
🔗 Semantic MediaWiki turns MediaWiki into a knowledge management platform with query and export capabilities
Stars: ✭ 359 (+6.21%)
Mutual labels:  knowledge-graph, linked-data, semantic-web
Pyld
JSON-LD processor written in Python
Stars: ✭ 413 (+22.19%)
Mutual labels:  linked-data, json-ld, semantic-web
jsonld-context-parser.js
Parses JSON-LD contexts
Stars: ✭ 20 (-94.08%)
Mutual labels:  linked-data, semantic-web, json-ld
Processor
Ontology-driven Linked Data processor and server for SPARQL backends. Apache License.
Stars: ✭ 54 (-84.02%)
Mutual labels:  linked-data, semantic-web, knowledge-graph
React Schemaorg
Type-checked Schema.org JSON-LD for React
Stars: ✭ 262 (-22.49%)
Mutual labels:  schema-org, json-ld, semantic-web

Build Status Coverage Status schema-dts npm version schema-dts-gen version

schema-dts

JSON-LD TypeScript types for Schema.org vocabulary.

schema-dts provides TypeScript definitions for Schema.org vocabulary in JSON-LD format. The typings are exposed as complete sets of discriminated type unions, allowing for easy completions and stricter validation.

Example of Code Completion using schema-dts

This repository contains two NPM packages:

  • schema-dts-gen Providing a command-line tool to generate TypeScript files based on a specific Schema version and layer.
  • schema-dts Pre-packaged TypeScript typings of latest Schema.org schema, without pending and other non-core layers.

Note: This is not an officially supported Google product.

Usage

To use the typings for your project, simply add the schema-dts NPM package to your project:

npm install schema-dts

Then you can use it by importing "schema-dts".

Root context

You will usually want your top-level item to include a @context, like https://schema.org. In order for your object type to accept this property, you can augment it with WithContext, e.g.:

import {Person, WithContext} from 'schema-dts';

const p: WithContext<Person> = {
  '@context': 'https://schema.org',
  '@type': 'Person',
  name: 'Eve',
  affiliation: {
    '@type': 'School',
    name: 'Nice School',
  },
};

Schema Typings Generator

The Schema Typings Generator is available in the schema-dts-gen package.

npm install schema-dts-gen
npx schema-dts-gen --ontology=https://schema.org/version/latest/schemaorg-all-https.nt

Command line usage:

  • Specify your ontology

    • Specify --ontology: An HTTPs URL to an .nt NTriple file declaring your ontology.

      Must be compatible with Schema.org, including the Schema.org DataTypes and specifying a top-level Thing type.

  • --context: Defaults to https://schema.org, the value or values to be used with the "@context" property.

    Can be either a single URL, or a comma separated list of two or more name:URL pairs.

    The context affects names of string properties in types, as well as the values of an object's "@type".

  • --deprecated/--nodeprecated: Whether or not to include deprecated Schema.org types and properties. When included, these types will still be marked with @deprecated JSDOC tags.

  • --verbose: Outputs additional logs and debugging notes to stderr.

Developers

Use NPM to install dependencies:

npm install

We have wrappers around tsc and tsc --build to build our generator other .d.ts files.

To generate TypeScript from the latest Schema.org Schema:

npm run build-gen && npm run build-schema

or simply build the schema-dts generator:

npm run build-gen

To contribute changes, see the CONTRIBUTING.md file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].