@astrale-os/kernel-dsl 1.0.0-beta.15 → 1.0.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/v1/builder/class/authoring.js +3 -2
  2. package/dist/v1/builder/class/input.d.ts +45 -14
  3. package/dist/v1/builder/index.d.ts +2 -1
  4. package/dist/v1/builder/lowering/class.d.ts +8 -0
  5. package/dist/v1/builder/lowering/class.js +40 -16
  6. package/dist/v1/builder/lowering/schema/compile.js +3 -3
  7. package/dist/v1/builder/policy/authoring.js +97 -88
  8. package/dist/v1/bundle/model.js +1 -1
  9. package/dist/v1/compiled/admission/accept.js +1 -7
  10. package/dist/v1/compiled/admission/semantics/class.js +2 -3
  11. package/dist/v1/compiled/admission/semantics/policy/parity.js +25 -13
  12. package/dist/v1/compiled/admission/semantics/policy/typing.js +2 -2
  13. package/dist/v1/compiled/admission/wire/class.js +23 -18
  14. package/dist/v1/compiled/admission/wire/policy.d.ts +4 -3
  15. package/dist/v1/compiled/admission/wire/policy.js +8 -7
  16. package/dist/v1/compiled/loader/load.js +1 -1
  17. package/dist/v1/domain/create.js +1 -1
  18. package/dist/v1/domain/model/input.d.ts +2 -1
  19. package/dist/v1/domain/projection/classes.js +1 -1
  20. package/dist/v1/domain/validation/create.d.ts +2 -1
  21. package/dist/v1/domain/validation/create.js +1 -1
  22. package/dist/v1/index.d.ts +1 -1
  23. package/dist/v1/language/.spec/schemas/draft-2020-12.schema.json +462 -0
  24. package/dist/v1/language/callable/resolved.d.ts +11 -2
  25. package/dist/v1/language/class/model/class.d.ts +17 -5
  26. package/dist/v1/language/freeze.d.ts +5 -0
  27. package/dist/v1/{schema/canonical → language}/freeze.js +4 -0
  28. package/dist/v1/language/policy/analysis/typing.d.ts +5 -2
  29. package/dist/v1/language/policy/analysis/typing.js +158 -42
  30. package/dist/v1/language/policy/model/policy.d.ts +44 -4
  31. package/dist/v1/language/policy/model/policy.js +14 -0
  32. package/dist/v1/language/policy/normalization/normalize.d.ts +6 -6
  33. package/dist/v1/language/policy/normalization/normalize.js +5 -5
  34. package/dist/v1/language/validation/rule.d.ts +22 -6
  35. package/dist/v1/language/validation/rule.js +4 -15
  36. package/dist/v1/language/value/evaluate/program.d.ts +2 -1
  37. package/dist/v1/language/value/evaluate/program.js +2 -2
  38. package/dist/v1/language/value/evaluate/validate.d.ts +2 -2
  39. package/dist/v1/language/value/evaluate/validate.js +2 -2
  40. package/dist/v1/language/value/ordering.d.ts +5 -0
  41. package/dist/v1/language/value/ordering.js +14 -0
  42. package/dist/v1/language/value/profile/json.validate.d.ts +3 -1
  43. package/dist/v1/language/value/profile/json.validate.js +3 -2
  44. package/dist/v1/language/value/reference/closure.js +3 -4
  45. package/dist/v1/language/value/reference/registry.index.d.ts +2 -0
  46. package/dist/v1/language/value/reference/registry.index.js +31 -15
  47. package/dist/v1/schema/.spec/schemas/domain-schema.schema.json +210 -27
  48. package/dist/v1/schema/admission/callable.js +1 -1
  49. package/dist/v1/schema/canonical/revision.js +4 -4
  50. package/dist/v1/schema/compatibility/comparators/callables.js +1 -1
  51. package/dist/v1/schema/compatibility/comparators/classes.js +4 -4
  52. package/dist/v1/schema/compatibility/comparators/members.js +1 -1
  53. package/dist/v1/schema/compatibility/comparators/values.js +2 -2
  54. package/dist/v1/schema/compatibility/report.js +1 -1
  55. package/dist/v1/schema/compatibility/versioning/index.js +1 -1
  56. package/dist/v1/schema/model/schema.js +1 -1
  57. package/dist/v1/schema/normalization/domain.js +9 -8
  58. package/dist/v1/schema/resolution/domain.js +1 -1
  59. package/dist/v1/schema/resolution/origins.js +3 -2
  60. package/dist/v1/schema/rule.d.ts +8 -14
  61. package/dist/v1/schema/rule.js +14 -2
  62. package/dist/v1/schema/validation/class.d.ts +6 -2
  63. package/dist/v1/schema/validation/class.js +20 -25
  64. package/dist/v1/schema/validation/domain.js +1 -1
  65. package/dist/v1/schema/validation/domain.json-schema.d.ts +2 -2
  66. package/dist/v1/schema/validation/domain.json-schema.js +20 -6
  67. package/dist/v1/schema/validation/domain.structure.d.ts +4765 -1005
  68. package/dist/v1/schema/validation/domain.structure.js +21 -9
  69. package/dist/v1/schema/validation/json.json-schema.d.ts +18 -2
  70. package/dist/v1/schema/validation/json.json-schema.js +14 -4
  71. package/dist/v1/schema/validation/policy/budgets.d.ts +1 -1
  72. package/dist/v1/schema/validation/policy/budgets.js +4 -4
  73. package/dist/v1/schema/validation/policy/context.d.ts +1 -2
  74. package/dist/v1/schema/validation/policy/context.js +2 -7
  75. package/dist/v1/schema/validation/policy/uses.d.ts +10 -2
  76. package/dist/v1/schema/validation/policy/uses.js +26 -13
  77. package/dist/v1/schema/validation/policy/validate.js +2 -3
  78. package/dist/v1/schema/validation/value-api.d.ts +2 -0
  79. package/dist/v1/schema/validation/value-api.js +2 -0
  80. package/dist/v1/schema/validation/value.json-schema.d.ts +7 -9
  81. package/dist/v1/schema/validation/value.json-schema.js +38 -27
  82. package/package.json +2 -1
  83. package/dist/v1/schema/canonical/domain.d.ts +0 -3
  84. package/dist/v1/schema/canonical/domain.digest.d.ts +0 -3
  85. package/dist/v1/schema/canonical/domain.digest.js +0 -5
  86. package/dist/v1/schema/canonical/domain.js +0 -5
  87. package/dist/v1/schema/canonical/freeze.d.ts +0 -1
@@ -2,6 +2,7 @@ import {} from '@astrale-os/kernel-dsl/value';
2
2
  import { Key } from '../../../addressing/index.js';
3
3
  import { MEDIA_TYPE_PATTERN } from '../../../language/class/model/data.js';
4
4
  import { compareEdgeUniqueTuples, compareNodeUniqueTuples, edgeUniqueTuple, nodeUniqueTuple, } from '../../../language/class/unique.js';
5
+ import { CLASS_OPERATIONS, isClassObservation } from '../../../language/policy/model/policy.js';
5
6
  import {} from '../../model/schema.js';
6
7
  import { invalid } from '../diagnostic.js';
7
8
  import { compiledCallable } from './callable.js';
@@ -63,26 +64,30 @@ export function compiledClass(input, values, path) {
63
64
  }
64
65
  function classPolicies(input, kind, path) {
65
66
  const value = object(input, 'Class Policies', path);
66
- exact(value, [], 'Class Policies', path, ['read', 'traverse']);
67
- if (value.read !== undefined)
68
- classPolicy(value.read, kind, 'Class read Policy', `${path}/read`);
69
- if (value.traverse !== undefined)
70
- classPolicy(value.traverse, kind, 'Class traverse Policy', `${path}/traverse`);
67
+ exact(value, [], 'Class Policies', path, CLASS_OPERATIONS);
68
+ for (const operation of CLASS_OPERATIONS) {
69
+ const policy = value[operation];
70
+ if (policy === undefined)
71
+ continue;
72
+ const label = `Class ${operation} Policy`;
73
+ const slot = `${path}/${operation}`;
74
+ if (isRuleChecks(policy)) {
75
+ classRuleChecks(policy, slot, kind === 'node' && operation === 'create' ? 'create' : 'class');
76
+ continue;
77
+ }
78
+ // Each slot spells one constant, and a Node create rule has no Node for a named Policy alone.
79
+ if (policy === !isClassObservation(operation))
80
+ continue;
81
+ if (kind === 'node' && operation === 'create')
82
+ invalid(label, undefined, slot);
83
+ definitionRef(policy, 'policy', label, slot);
84
+ }
71
85
  }
72
- /**
73
- * Check one observation slot: `false`, the rule no caller satisfies, a named Policy, or, on a Node
74
- * Class only, Policy checks over the observed Node.
75
- */
76
- function classPolicy(input, kind, label, path) {
77
- if (kind === 'node' &&
78
- input !== null &&
86
+ /** Policy checks, as opposed to a constant or a named Policy. */
87
+ function isRuleChecks(input) {
88
+ return (input !== null &&
79
89
  typeof input === 'object' &&
80
- ['check', 'sameNode', 'allOf', 'anyOf'].some((key) => Object.hasOwn(input, key))) {
81
- classRuleChecks(input, path);
82
- return;
83
- }
84
- if (input !== false)
85
- definitionRef(input, 'policy', label, path);
90
+ ['check', 'sameNode', 'allOf', 'anyOf'].some((key) => Object.hasOwn(input, key)));
86
91
  }
87
92
  function edgeContract(value, path) {
88
93
  const constraintsPath = `${path}/constraints`;
@@ -4,7 +4,8 @@ export declare function compiledPolicy(input: JsonValue, path: string): never;
4
4
  /** Check one callable's caller rule: `true`, the rule every caller satisfies, or Policy checks. */
5
5
  export declare function callablePolicy(input: JsonValue | undefined, path: string): void;
6
6
  /**
7
- * Check one Node Class rule: Policy checks over `self` and `ref` objects only, in their one
8
- * spelling. A lone check of `self` is spelled as the Policy reference itself.
7
+ * Check one Class rule: Policy checks over `self` and `ref` objects only, or, in a Node create
8
+ * rule, `ref` objects only, in their one spelling. A lone check of `self` is spelled as the Policy
9
+ * reference itself.
9
10
  */
10
- export declare function classRuleChecks(input: JsonValue, path: string): void;
11
+ export declare function classRuleChecks(input: JsonValue, path: string, site: 'class' | 'create'): void;
@@ -130,17 +130,18 @@ export function callablePolicy(input, path) {
130
130
  policyCheck(input, 0, path);
131
131
  }
132
132
  /**
133
- * Check one Node Class rule: Policy checks over `self` and `ref` objects only, in their one
134
- * spelling. A lone check of `self` is spelled as the Policy reference itself.
133
+ * Check one Class rule: Policy checks over `self` and `ref` objects only, or, in a Node create
134
+ * rule, `ref` objects only, in their one spelling. A lone check of `self` is spelled as the Policy
135
+ * reference itself.
135
136
  */
136
- export function classRuleChecks(input, path) {
137
- policyCheck(input, 0, path, 'class');
137
+ export function classRuleChecks(input, path, site) {
138
+ policyCheck(input, 0, path, site);
138
139
  const rule = input;
139
140
  if (json.serialize(normalizeClassRule(rule)) !== json.serialize(rule))
140
141
  invalid('Class rule spelling', undefined, path);
141
142
  }
142
143
  /** What a site calls its checks in a refusal. */
143
- const SITE = { callable: 'Callable Policy', class: 'Class rule' };
144
+ const SITE = { callable: 'Callable Policy', class: 'Class rule', create: 'Create rule' };
144
145
  /** Check the recursive Policy check wire grammar of one use site. */
145
146
  function policyCheck(input, depth, path, site = 'callable') {
146
147
  const name = SITE[site];
@@ -148,7 +149,7 @@ function policyCheck(input, depth, path, site = 'callable') {
148
149
  invalid(`${name} depth`, undefined, path);
149
150
  const value = object(input, name, path);
150
151
  if (Object.hasOwn(value, 'sameNode')) {
151
- const equality = site === 'class' ? 'Class rule equality' : 'Callable equality';
152
+ const equality = site === 'callable' ? 'Callable equality' : `${name} equality`;
152
153
  exact(value, ['sameNode'], equality, path);
153
154
  const pair = object(value.sameNode, equality, `${path}/sameNode`);
154
155
  exact(pair, ['left', 'right'], `${equality} operands`, `${path}/sameNode`);
@@ -174,7 +175,7 @@ function policyCheck(input, depth, path, site = 'callable') {
174
175
  function policyCheckObject(input, objectPath, site) {
175
176
  const name = SITE[site];
176
177
  const target = object(input, `${name} object`, objectPath);
177
- if (target.kind === 'self')
178
+ if (target.kind === 'self' && site !== 'create')
178
179
  exact(target, ['kind'], `${name} self`, objectPath);
179
180
  else if (target.kind === 'input' && site === 'callable') {
180
181
  exact(target, ['kind', 'field'], `${name} input`, objectPath);
@@ -107,7 +107,7 @@ function programValidation(programs, properties, propertyOrdering, callables) {
107
107
  ...(callable.fields === undefined
108
108
  ? {}
109
109
  : { fields: Object.freeze(Object.keys(callable.fields)) }),
110
- validateInput: (value) => validateValueProgram(input, value),
110
+ validateInput: (value, options) => validateValueProgram(input, value, [input.root], options),
111
111
  validateInputField(field, value) {
112
112
  const nodes = callable.fields?.[field];
113
113
  return nodes === undefined
@@ -136,7 +136,7 @@ function createDefinitions(declarations, classesByKey, input) {
136
136
  policy: definition.policy,
137
137
  ...(inputFields === undefined ? {} : { inputFields }),
138
138
  definition,
139
- validateInput: (value) => input.validation.callableInput(key, value),
139
+ validateInput: (value, options) => input.validation.callableInput(key, value, options),
140
140
  validateInputField: (field, value) => input.validation.callableInputField(key, field, value),
141
141
  validateOutput: (value) => input.validation.callableOutput(key, value),
142
142
  });
@@ -1,3 +1,4 @@
1
+ import type { Options } from '@astrale-os/kernel-dsl/value';
1
2
  import type { Key as AddressKey, PropertyKey, Revision } from '../../addressing/index.js';
2
3
  import type { DomainDependency, DomainDependencyMap } from '../../addressing/index.js';
3
4
  import type { CoreEdge } from '../../language/core/model/core.js';
@@ -27,7 +28,7 @@ export interface DomainValidation {
27
28
  propertyProgram(key: PropertyKey): ValueProgram;
28
29
  propertyOrdering(key: PropertyKey): OrderingKind | undefined;
29
30
  callableExists(key: AddressKey.Callable): boolean;
30
- callableInput(key: AddressKey.Callable, input: unknown): readonly Diagnostic[];
31
+ callableInput(key: AddressKey.Callable, input: unknown, options?: Options): readonly Diagnostic[];
31
32
  callableFields(key: AddressKey.Callable): readonly string[] | undefined;
32
33
  callableInputField(key: AddressKey.Callable, field: string, input: unknown): readonly Diagnostic[];
33
34
  callableOutput(key: AddressKey.Callable, output: unknown): readonly Diagnostic[];
@@ -80,7 +80,7 @@ export function createClasses(definitions, validation) {
80
80
  executable: isMethodExecutable(definition, methodDefinition),
81
81
  ...(inputFields === undefined ? {} : { inputFields }),
82
82
  definition: methodDefinition,
83
- validateInput: (input) => validation.callableInput(methodKey, input),
83
+ validateInput: (input, options) => validation.callableInput(methodKey, input, options),
84
84
  validateInputField: (field, input) => validation.callableInputField(methodKey, field, input),
85
85
  validateOutput: (output) => validation.callableOutput(methodKey, output),
86
86
  });
@@ -1,3 +1,4 @@
1
+ import type { Options } from '@astrale-os/kernel-dsl/value';
1
2
  import type { Key, PropertyKey } from '../../addressing/index.js';
2
3
  import type { Diagnostic } from '../../language/validation/diagnostic.js';
3
4
  import type { ValueProgram } from '../../language/value/compile/model.js';
@@ -10,7 +11,7 @@ export interface PropertyValidation {
10
11
  }
11
12
  export interface CallableValidation {
12
13
  readonly fields?: readonly string[];
13
- validateInput(input: unknown): readonly Diagnostic[];
14
+ validateInput(input: unknown, options?: Options): readonly Diagnostic[];
14
15
  validateInputField(field: string, input: unknown): readonly Diagnostic[];
15
16
  validateOutput(output: unknown): readonly Diagnostic[];
16
17
  }
@@ -21,7 +21,7 @@ export function createDomainValidation(properties, callables) {
21
21
  propertyProgram: (key) => propertyOf(key).program(),
22
22
  propertyOrdering: (key) => properties.get(key)?.ordering,
23
23
  callableExists: (key) => callables.has(key),
24
- callableInput: (key, input) => callableOf(key).validateInput(input),
24
+ callableInput: (key, input, options) => callableOf(key).validateInput(input, options),
25
25
  callableFields: (key) => callables.get(key)?.fields,
26
26
  callableInputField: (key, field, input) => callableOf(key).validateInputField(field, input),
27
27
  callableOutput: (key, output) => callableOf(key).validateOutput(output),
@@ -5,7 +5,7 @@ export { isBinaryInput } from './language/callable/model/callable.js';
5
5
  export type { EventOf, StateMachine, StateOf } from './language/state/index.js';
6
6
  export { PropertyValues } from './language/index.js';
7
7
  export * as metadata from './language/definition/metadata.js';
8
- export type { AnyResolvedClass, BoundMethodOf, BoundMethodShortcutsOf, CallableResultOf, CallableInputOf, CallableInputModeOf, CallableOutputOf, ClassSatisfactionKeysOf, ClassDefinition, CoreDefinition, CoreEdge, FunctionAuth, FunctionDefinition, Inheritance, BinaryInput, BinaryInputProjection, CallableInputContract, MethodDefinition, MethodOwnerKeyOf, CallablePolicy, ClassPolicy, ClassRuleChecks, ClassRuleObject, NodeClassPolicy, PolicyCheckExpression, PolicyDefinition, PropertyImmutability, PropertyInputOf, PropertyAccessOf, PropertyOutputOf, PropertyShortcutsOf, PropertyValuesOf, ResolvedClass, ResolvedCoreDefinition, ResolvedCoreEndpoint, ResolvedData, ResolvedFunction, ExecutableMethod, ResolvedMethod, ResolvedMethodCollection, ResolvedPolicy, ResolvedProperty, ResolvedView, MethodAccessOf, SelfMethodsOf, SelfPropertiesOf, SelfStaticMethodsOf, StaticMethodsOf, ViewDefinition, } from './language/index.js';
8
+ export type { AnyResolvedClass, BoundMethodOf, BoundMethodShortcutsOf, CallableResultOf, CallableInputOf, CallableInputModeOf, CallableOutputOf, ClassSatisfactionKeysOf, ClassDefinition, CoreDefinition, CoreEdge, FunctionAuth, FunctionDefinition, Inheritance, BinaryInput, BinaryInputProjection, CallableInputContract, MethodDefinition, MethodOwnerKeyOf, CallablePolicy, ClassPolicy, ClassRuleChecks, ClassRuleObject, ClassWritePolicy, CreateRuleChecks, EdgeClassPolicy, EdgeClassWritePolicy, EdgeRuleChecks, NodeClassCreatePolicy, NodeClassPolicy, NodeClassWritePolicy, PolicyCheckExpression, PolicyDefinition, PropertyImmutability, PropertyInputOf, PropertyAccessOf, PropertyOutputOf, PropertyShortcutsOf, PropertyValuesOf, ResolvedClass, ResolvedCoreDefinition, ResolvedCoreEndpoint, ResolvedData, ResolvedFunction, ExecutableMethod, ResolvedMethod, ResolvedMethodCollection, ResolvedPolicy, ResolvedProperty, ResolvedView, MethodAccessOf, SelfMethodsOf, SelfPropertiesOf, SelfStaticMethodsOf, StaticMethodsOf, ViewDefinition, } from './language/index.js';
9
9
  export { acceptDefinitionRef, callableAddress, ClassKey, equalDefinitionRefs, isDefinitionRef, Key, MethodKey, PropertyKey, } from './addressing/index.js';
10
10
  export type { ClassRef, CoreRef, DefinitionBase, DefinitionKey, DefinitionRef, FunctionRef, MethodAddress, PolicyRef, Revision, ViewRef, } from './addressing/index.js';
11
11
  export type { Definition } from './language/index.js';
@@ -0,0 +1,462 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.astrale.ai/dsl/v1/draft-2020-12",
4
+ "title": "JSON Schema Draft 2020-12",
5
+ "$comment": "The Draft 2020-12 meta-schemas the V1 value-schema dialect composes, each under its own $id, exactly as the validator of the dialect embeds them. With value-schema.schema.json, they resolve the dialect without a network fetch.",
6
+ "$defs": {
7
+ "schema": {
8
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
9
+ "$id": "https://json-schema.org/draft/2020-12/schema",
10
+ "$vocabulary": {
11
+ "https://json-schema.org/draft/2020-12/vocab/core": true,
12
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true,
13
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
14
+ "https://json-schema.org/draft/2020-12/vocab/validation": true,
15
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
16
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
17
+ "https://json-schema.org/draft/2020-12/vocab/content": true
18
+ },
19
+ "$dynamicAnchor": "meta",
20
+ "title": "Core and Validation specifications meta-schema",
21
+ "allOf": [
22
+ {
23
+ "$ref": "meta/core"
24
+ },
25
+ {
26
+ "$ref": "meta/applicator"
27
+ },
28
+ {
29
+ "$ref": "meta/unevaluated"
30
+ },
31
+ {
32
+ "$ref": "meta/validation"
33
+ },
34
+ {
35
+ "$ref": "meta/meta-data"
36
+ },
37
+ {
38
+ "$ref": "meta/format-annotation"
39
+ },
40
+ {
41
+ "$ref": "meta/content"
42
+ }
43
+ ],
44
+ "type": [
45
+ "object",
46
+ "boolean"
47
+ ],
48
+ "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
49
+ "properties": {
50
+ "definitions": {
51
+ "$comment": "\"definitions\" has been replaced by \"$defs\".",
52
+ "type": "object",
53
+ "additionalProperties": {
54
+ "$dynamicRef": "#meta"
55
+ },
56
+ "deprecated": true,
57
+ "default": {}
58
+ },
59
+ "dependencies": {
60
+ "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
61
+ "type": "object",
62
+ "additionalProperties": {
63
+ "anyOf": [
64
+ {
65
+ "$dynamicRef": "#meta"
66
+ },
67
+ {
68
+ "$ref": "meta/validation#/$defs/stringArray"
69
+ }
70
+ ]
71
+ },
72
+ "deprecated": true,
73
+ "default": {}
74
+ },
75
+ "$recursiveAnchor": {
76
+ "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
77
+ "$ref": "meta/core#/$defs/anchorString",
78
+ "deprecated": true
79
+ },
80
+ "$recursiveRef": {
81
+ "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
82
+ "$ref": "meta/core#/$defs/uriReferenceString",
83
+ "deprecated": true
84
+ }
85
+ }
86
+ },
87
+ "core": {
88
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
89
+ "$id": "https://json-schema.org/draft/2020-12/meta/core",
90
+ "$vocabulary": {
91
+ "https://json-schema.org/draft/2020-12/vocab/core": true
92
+ },
93
+ "$dynamicAnchor": "meta",
94
+ "title": "Core vocabulary meta-schema",
95
+ "type": [
96
+ "object",
97
+ "boolean"
98
+ ],
99
+ "properties": {
100
+ "$id": {
101
+ "$ref": "#/$defs/uriReferenceString",
102
+ "$comment": "Non-empty fragments not allowed.",
103
+ "pattern": "^[^#]*#?$"
104
+ },
105
+ "$schema": {
106
+ "$ref": "#/$defs/uriString"
107
+ },
108
+ "$ref": {
109
+ "$ref": "#/$defs/uriReferenceString"
110
+ },
111
+ "$anchor": {
112
+ "$ref": "#/$defs/anchorString"
113
+ },
114
+ "$dynamicRef": {
115
+ "$ref": "#/$defs/uriReferenceString"
116
+ },
117
+ "$dynamicAnchor": {
118
+ "$ref": "#/$defs/anchorString"
119
+ },
120
+ "$vocabulary": {
121
+ "type": "object",
122
+ "propertyNames": {
123
+ "$ref": "#/$defs/uriString"
124
+ },
125
+ "additionalProperties": {
126
+ "type": "boolean"
127
+ }
128
+ },
129
+ "$comment": {
130
+ "type": "string"
131
+ },
132
+ "$defs": {
133
+ "type": "object",
134
+ "additionalProperties": {
135
+ "$dynamicRef": "#meta"
136
+ }
137
+ }
138
+ },
139
+ "$defs": {
140
+ "anchorString": {
141
+ "type": "string",
142
+ "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
143
+ },
144
+ "uriString": {
145
+ "type": "string",
146
+ "format": "uri"
147
+ },
148
+ "uriReferenceString": {
149
+ "type": "string",
150
+ "format": "uri-reference"
151
+ }
152
+ }
153
+ },
154
+ "applicator": {
155
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
156
+ "$id": "https://json-schema.org/draft/2020-12/meta/applicator",
157
+ "$vocabulary": {
158
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true
159
+ },
160
+ "$dynamicAnchor": "meta",
161
+ "title": "Applicator vocabulary meta-schema",
162
+ "type": [
163
+ "object",
164
+ "boolean"
165
+ ],
166
+ "properties": {
167
+ "prefixItems": {
168
+ "$ref": "#/$defs/schemaArray"
169
+ },
170
+ "items": {
171
+ "$dynamicRef": "#meta"
172
+ },
173
+ "contains": {
174
+ "$dynamicRef": "#meta"
175
+ },
176
+ "additionalProperties": {
177
+ "$dynamicRef": "#meta"
178
+ },
179
+ "properties": {
180
+ "type": "object",
181
+ "additionalProperties": {
182
+ "$dynamicRef": "#meta"
183
+ },
184
+ "default": {}
185
+ },
186
+ "patternProperties": {
187
+ "type": "object",
188
+ "additionalProperties": {
189
+ "$dynamicRef": "#meta"
190
+ },
191
+ "propertyNames": {
192
+ "format": "regex"
193
+ },
194
+ "default": {}
195
+ },
196
+ "dependentSchemas": {
197
+ "type": "object",
198
+ "additionalProperties": {
199
+ "$dynamicRef": "#meta"
200
+ },
201
+ "default": {}
202
+ },
203
+ "propertyNames": {
204
+ "$dynamicRef": "#meta"
205
+ },
206
+ "if": {
207
+ "$dynamicRef": "#meta"
208
+ },
209
+ "then": {
210
+ "$dynamicRef": "#meta"
211
+ },
212
+ "else": {
213
+ "$dynamicRef": "#meta"
214
+ },
215
+ "allOf": {
216
+ "$ref": "#/$defs/schemaArray"
217
+ },
218
+ "anyOf": {
219
+ "$ref": "#/$defs/schemaArray"
220
+ },
221
+ "oneOf": {
222
+ "$ref": "#/$defs/schemaArray"
223
+ },
224
+ "not": {
225
+ "$dynamicRef": "#meta"
226
+ }
227
+ },
228
+ "$defs": {
229
+ "schemaArray": {
230
+ "type": "array",
231
+ "minItems": 1,
232
+ "items": {
233
+ "$dynamicRef": "#meta"
234
+ }
235
+ }
236
+ }
237
+ },
238
+ "unevaluated": {
239
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
240
+ "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated",
241
+ "$vocabulary": {
242
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true
243
+ },
244
+ "$dynamicAnchor": "meta",
245
+ "title": "Unevaluated applicator vocabulary meta-schema",
246
+ "type": [
247
+ "object",
248
+ "boolean"
249
+ ],
250
+ "properties": {
251
+ "unevaluatedItems": {
252
+ "$dynamicRef": "#meta"
253
+ },
254
+ "unevaluatedProperties": {
255
+ "$dynamicRef": "#meta"
256
+ }
257
+ }
258
+ },
259
+ "validation": {
260
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
261
+ "$id": "https://json-schema.org/draft/2020-12/meta/validation",
262
+ "$vocabulary": {
263
+ "https://json-schema.org/draft/2020-12/vocab/validation": true
264
+ },
265
+ "$dynamicAnchor": "meta",
266
+ "title": "Validation vocabulary meta-schema",
267
+ "type": [
268
+ "object",
269
+ "boolean"
270
+ ],
271
+ "properties": {
272
+ "type": {
273
+ "anyOf": [
274
+ {
275
+ "$ref": "#/$defs/simpleTypes"
276
+ },
277
+ {
278
+ "type": "array",
279
+ "items": {
280
+ "$ref": "#/$defs/simpleTypes"
281
+ },
282
+ "minItems": 1,
283
+ "uniqueItems": true
284
+ }
285
+ ]
286
+ },
287
+ "const": true,
288
+ "enum": {
289
+ "type": "array",
290
+ "items": true
291
+ },
292
+ "multipleOf": {
293
+ "type": "number",
294
+ "exclusiveMinimum": 0
295
+ },
296
+ "maximum": {
297
+ "type": "number"
298
+ },
299
+ "exclusiveMaximum": {
300
+ "type": "number"
301
+ },
302
+ "minimum": {
303
+ "type": "number"
304
+ },
305
+ "exclusiveMinimum": {
306
+ "type": "number"
307
+ },
308
+ "maxLength": {
309
+ "$ref": "#/$defs/nonNegativeInteger"
310
+ },
311
+ "minLength": {
312
+ "$ref": "#/$defs/nonNegativeIntegerDefault0"
313
+ },
314
+ "pattern": {
315
+ "type": "string",
316
+ "format": "regex"
317
+ },
318
+ "maxItems": {
319
+ "$ref": "#/$defs/nonNegativeInteger"
320
+ },
321
+ "minItems": {
322
+ "$ref": "#/$defs/nonNegativeIntegerDefault0"
323
+ },
324
+ "uniqueItems": {
325
+ "type": "boolean",
326
+ "default": false
327
+ },
328
+ "maxContains": {
329
+ "$ref": "#/$defs/nonNegativeInteger"
330
+ },
331
+ "minContains": {
332
+ "$ref": "#/$defs/nonNegativeInteger",
333
+ "default": 1
334
+ },
335
+ "maxProperties": {
336
+ "$ref": "#/$defs/nonNegativeInteger"
337
+ },
338
+ "minProperties": {
339
+ "$ref": "#/$defs/nonNegativeIntegerDefault0"
340
+ },
341
+ "required": {
342
+ "$ref": "#/$defs/stringArray"
343
+ },
344
+ "dependentRequired": {
345
+ "type": "object",
346
+ "additionalProperties": {
347
+ "$ref": "#/$defs/stringArray"
348
+ }
349
+ }
350
+ },
351
+ "$defs": {
352
+ "nonNegativeInteger": {
353
+ "type": "integer",
354
+ "minimum": 0
355
+ },
356
+ "nonNegativeIntegerDefault0": {
357
+ "$ref": "#/$defs/nonNegativeInteger",
358
+ "default": 0
359
+ },
360
+ "simpleTypes": {
361
+ "enum": [
362
+ "array",
363
+ "boolean",
364
+ "integer",
365
+ "null",
366
+ "number",
367
+ "object",
368
+ "string"
369
+ ]
370
+ },
371
+ "stringArray": {
372
+ "type": "array",
373
+ "items": {
374
+ "type": "string"
375
+ },
376
+ "uniqueItems": true,
377
+ "default": []
378
+ }
379
+ }
380
+ },
381
+ "meta-data": {
382
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
383
+ "$id": "https://json-schema.org/draft/2020-12/meta/meta-data",
384
+ "$vocabulary": {
385
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true
386
+ },
387
+ "$dynamicAnchor": "meta",
388
+ "title": "Meta-data vocabulary meta-schema",
389
+ "type": [
390
+ "object",
391
+ "boolean"
392
+ ],
393
+ "properties": {
394
+ "title": {
395
+ "type": "string"
396
+ },
397
+ "description": {
398
+ "type": "string"
399
+ },
400
+ "default": true,
401
+ "deprecated": {
402
+ "type": "boolean",
403
+ "default": false
404
+ },
405
+ "readOnly": {
406
+ "type": "boolean",
407
+ "default": false
408
+ },
409
+ "writeOnly": {
410
+ "type": "boolean",
411
+ "default": false
412
+ },
413
+ "examples": {
414
+ "type": "array",
415
+ "items": true
416
+ }
417
+ }
418
+ },
419
+ "format-annotation": {
420
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
421
+ "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation",
422
+ "$vocabulary": {
423
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true
424
+ },
425
+ "$dynamicAnchor": "meta",
426
+ "title": "Format vocabulary meta-schema for annotation results",
427
+ "type": [
428
+ "object",
429
+ "boolean"
430
+ ],
431
+ "properties": {
432
+ "format": {
433
+ "type": "string"
434
+ }
435
+ }
436
+ },
437
+ "content": {
438
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
439
+ "$id": "https://json-schema.org/draft/2020-12/meta/content",
440
+ "$vocabulary": {
441
+ "https://json-schema.org/draft/2020-12/vocab/content": true
442
+ },
443
+ "$dynamicAnchor": "meta",
444
+ "title": "Content vocabulary meta-schema",
445
+ "type": [
446
+ "object",
447
+ "boolean"
448
+ ],
449
+ "properties": {
450
+ "contentEncoding": {
451
+ "type": "string"
452
+ },
453
+ "contentMediaType": {
454
+ "type": "string"
455
+ },
456
+ "contentSchema": {
457
+ "$dynamicRef": "#meta"
458
+ }
459
+ }
460
+ }
461
+ }
462
+ }