@jsonjoy.com/json-type
Version:
High-performance JSON Pointer implementation
355 lines • 14.3 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.module = void 0;
exports.module = {
kind: 'module',
keys: [
{
kind: 'key',
key: 'Display',
value: {
kind: 'obj',
title: 'Display options for JSON Type',
description: 'These options are used to display the type in documentation or code generation.',
keys: [
{ kind: 'key', key: 'title', optional: true, value: { kind: 'str' } },
{ kind: 'key', key: 'intro', optional: true, value: { kind: 'str' } },
{ kind: 'key', key: 'description', optional: true, value: { kind: 'str' } },
],
},
},
{
kind: 'key',
key: 'SchemaExample',
value: {
kind: 'obj',
extends: ['Display'],
keys: [{ kind: 'key', key: 'value', value: { kind: 'any' } }],
},
},
{
kind: 'key',
key: 'SchemaBase',
value: {
kind: 'obj',
extends: ['Display'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'str' } },
{ kind: 'key', key: 'meta', optional: true, value: { kind: 'map', value: { kind: 'any' } } },
{ kind: 'key', key: 'default', optional: true, value: { kind: 'any' } },
{
kind: 'key',
key: 'examples',
optional: true,
value: { kind: 'arr', type: { kind: 'ref', ref: 'SchemaExample' } },
},
{
kind: 'key',
key: 'deprecated',
optional: true,
value: {
kind: 'obj',
keys: [{ kind: 'key', key: 'info', optional: true, value: { kind: 'str' } }],
},
},
{ kind: 'key', key: 'metadata', optional: true, value: { kind: 'map', value: { kind: 'any' } } },
],
},
},
{
kind: 'key',
key: 'AnySchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'any' } }],
},
},
{
kind: 'key',
key: 'ConSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'con' } },
{ kind: 'key', key: 'value', value: { kind: 'any' } },
],
},
},
{
kind: 'key',
key: 'BoolSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'bool' } }],
},
},
{
kind: 'key',
key: 'NumSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'num' } },
{
kind: 'key',
key: 'format',
optional: true,
value: {
kind: 'or',
discriminator: ['num', -1],
types: [
{ kind: 'con', value: 'i' },
{ kind: 'con', value: 'u' },
{ kind: 'con', value: 'f' },
{ kind: 'con', value: 'i8' },
{ kind: 'con', value: 'i16' },
{ kind: 'con', value: 'i32' },
{ kind: 'con', value: 'i64' },
{ kind: 'con', value: 'u8' },
{ kind: 'con', value: 'u16' },
{ kind: 'con', value: 'u32' },
{ kind: 'con', value: 'u64' },
{ kind: 'con', value: 'f32' },
{ kind: 'con', value: 'f64' },
],
},
},
{ kind: 'key', key: 'gt', optional: true, value: { kind: 'num' } },
{ kind: 'key', key: 'gte', optional: true, value: { kind: 'num' } },
{ kind: 'key', key: 'lt', optional: true, value: { kind: 'num' } },
{ kind: 'key', key: 'lte', optional: true, value: { kind: 'num' } },
],
},
},
{
kind: 'key',
key: 'StrSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'str' } },
{
kind: 'key',
key: 'format',
optional: true,
value: {
kind: 'or',
discriminator: ['num', -1],
types: [
{ kind: 'con', value: 'ascii' },
{ kind: 'con', value: 'utf8' },
],
},
},
{ kind: 'key', key: 'ascii', optional: true, value: { kind: 'bool' } },
{ kind: 'key', key: 'noJsonEscape', optional: true, value: { kind: 'bool' } },
{ kind: 'key', key: 'min', optional: true, value: { kind: 'num' } },
{ kind: 'key', key: 'max', optional: true, value: { kind: 'num' } },
],
},
},
{
kind: 'key',
key: 'BinSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'bin' } },
{ kind: 'key', key: 'type', value: { kind: 'ref', ref: 'Schema' } },
{
kind: 'key',
key: 'format',
optional: true,
value: {
kind: 'or',
discriminator: ['num', -1],
types: [
{ kind: 'con', value: 'json' },
{ kind: 'con', value: 'cbor' },
{ kind: 'con', value: 'msgpack' },
{ kind: 'con', value: 'resp3' },
{ kind: 'con', value: 'ion' },
{ kind: 'con', value: 'bson' },
{ kind: 'con', value: 'ubjson' },
{ kind: 'con', value: 'bencode' },
],
},
},
{ kind: 'key', key: 'min', optional: true, value: { kind: 'num' } },
{ kind: 'key', key: 'max', optional: true, value: { kind: 'num' } },
],
},
},
{
kind: 'key',
key: 'ArrSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'arr' } },
{ kind: 'key', key: 'type', optional: true, value: { kind: 'ref', ref: 'Schema' } },
{ kind: 'key', key: 'head', optional: true, value: { kind: 'arr', type: { kind: 'ref', ref: 'Schema' } } },
{ kind: 'key', key: 'tail', optional: true, value: { kind: 'arr', type: { kind: 'ref', ref: 'Schema' } } },
{ kind: 'key', key: 'min', optional: true, value: { kind: 'num' } },
{ kind: 'key', key: 'max', optional: true, value: { kind: 'num' } },
],
},
},
{
kind: 'key',
key: 'KeySchema',
value: {
kind: 'obj',
extends: ['SchemaBase', 'Display'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'key' } },
{ kind: 'key', key: 'key', value: { kind: 'str' } },
{ kind: 'key', key: 'value', value: { kind: 'ref', ref: 'Schema' } },
{ kind: 'key', key: 'optional', optional: true, value: { kind: 'bool' } },
],
},
},
{
kind: 'key',
key: 'ObjSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'obj' } },
{ kind: 'key', key: 'keys', value: { kind: 'arr', type: { kind: 'ref', ref: 'KeySchema' } } },
{ kind: 'key', key: 'extends', optional: true, value: { kind: 'arr', type: { kind: 'str' } } },
{ kind: 'key', key: 'decodeUnknownKeys', optional: true, value: { kind: 'bool' } },
{ kind: 'key', key: 'encodeUnknownKeys', optional: true, value: { kind: 'bool' } },
],
},
},
{
kind: 'key',
key: 'MapSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'map' } },
{ kind: 'key', key: 'key', optional: true, value: { kind: 'ref', ref: 'Schema' } },
{ kind: 'key', key: 'value', value: { kind: 'ref', ref: 'Schema' } },
],
},
},
{
kind: 'key',
key: 'RefSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'ref' } },
{ kind: 'key', key: 'ref', value: { kind: 'str' } },
],
},
},
{
kind: 'key',
key: 'OrSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'or' } },
{ kind: 'key', key: 'types', value: { kind: 'arr', type: { kind: 'ref', ref: 'Schema' } } },
{ kind: 'key', key: 'discriminator', value: { kind: 'any' } },
],
},
},
{
kind: 'key',
key: 'FnSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'fn' } },
{ kind: 'key', key: 'req', value: { kind: 'ref', ref: 'Schema' } },
{ kind: 'key', key: 'res', value: { kind: 'ref', ref: 'Schema' } },
],
},
},
{
kind: 'key',
key: 'FnRxSchema',
value: {
kind: 'obj',
extends: ['SchemaBase'],
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'fn$' } },
{ kind: 'key', key: 'req', value: { kind: 'ref', ref: 'Schema' } },
{ kind: 'key', key: 'res', value: { kind: 'ref', ref: 'Schema' } },
],
},
},
{
kind: 'key',
key: 'AliasSchema',
value: {
kind: 'obj',
extends: ['KeySchema'],
keys: [{ kind: 'key', key: 'pub', optional: true, value: { kind: 'bool' } }],
},
},
{
kind: 'key',
key: 'ModuleSchema',
value: {
kind: 'obj',
keys: [
{ kind: 'key', key: 'kind', value: { kind: 'con', value: 'module' } },
{ kind: 'key', key: 'keys', value: { kind: 'arr', type: { kind: 'ref', ref: 'AliasSchema' } } },
],
},
},
{
kind: 'key',
key: 'JsonSchema',
value: {
kind: 'or',
discriminator: ['num', -1],
types: [
{ kind: 'ref', ref: 'BoolSchema' },
{ kind: 'ref', ref: 'NumSchema' },
{ kind: 'ref', ref: 'StrSchema' },
{ kind: 'ref', ref: 'BinSchema' },
{ kind: 'ref', ref: 'ArrSchema' },
{ kind: 'ref', ref: 'ConSchema' },
{ kind: 'ref', ref: 'ObjSchema' },
{ kind: 'ref', ref: 'KeySchema' },
{ kind: 'ref', ref: 'MapSchema' },
],
},
},
{
kind: 'key',
key: 'Schema',
value: {
kind: 'or',
discriminator: ['num', -1],
types: [
{ kind: 'ref', ref: 'JsonSchema' },
{ kind: 'ref', ref: 'RefSchema' },
{ kind: 'ref', ref: 'OrSchema' },
{ kind: 'ref', ref: 'AnySchema' },
{ kind: 'ref', ref: 'FnSchema' },
{ kind: 'ref', ref: 'FnRxSchema' },
],
},
},
],
};
//# sourceMappingURL=metaschema.js.map