@swagger-api/apidom-ns-json-schema-draft-6 1.0.0-beta.2 → 1.0.0-beta.4

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-beta.4](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2024-12-13)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-ns-json-schema-draft-6
9
+
10
+ # [1.0.0-beta.3](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2024-11-25)
11
+
12
+ **Note:** Version bump only for package @swagger-api/apidom-ns-json-schema-draft-6
13
+
6
14
  # [1.0.0-beta.2](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2024-11-22)
7
15
 
8
16
  **Note:** Version bump only for package @swagger-api/apidom-ns-json-schema-draft-6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swagger-api/apidom-ns-json-schema-draft-6",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.4",
4
4
  "description": "JSON Schema Draft 6 namespace for ApiDOM.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -14,11 +14,11 @@
14
14
  "unpkg": "./dist/apidom-ns-json-schema-draft-6.browser.min.js",
15
15
  "main": "./src/index.cjs",
16
16
  "exports": {
17
- "types": "./types/dist.d.ts",
17
+ "types": "./types/apidom-ns-json-schema-draft-6.d.ts",
18
18
  "import": "./src/index.mjs",
19
19
  "require": "./src/index.cjs"
20
20
  },
21
- "types": "./types/dist.d.ts",
21
+ "types": "./types/apidom-ns-json-schema-draft-6.d.ts",
22
22
  "scripts": {
23
23
  "build": "npm run clean && run-p --max-parallel ${CPU_CORES:-2} typescript:declaration build:es build:cjs build:umd:browser",
24
24
  "build:es": "cross-env BABEL_ENV=es babel src --out-dir src --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward'",
@@ -30,7 +30,7 @@
30
30
  "test": "npm run build:es && cross-env BABEL_ENV=es babel test --out-dir test --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward' && cross-env NODE_ENV=test mocha",
31
31
  "test:update-snapshots": "cross-env UPDATE_SNAPSHOT=1 mocha",
32
32
  "typescript:check-types": "tsc --noEmit && tsc -p ./test/tsconfig.json --noEmit",
33
- "typescript:declaration": "tsc -p tsconfig.declaration.json && rollup -c config/rollup/types.dist.js",
33
+ "typescript:declaration": "tsc -p tsconfig.declaration.json && api-extractor run -l -c ./config/api-extractor/api-extractor.json 2>&1 | shx grep -v 'Visitor_base'",
34
34
  "prepack": "copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .",
35
35
  "postpack": "rimraf NOTICE LICENSES"
36
36
  },
@@ -42,9 +42,9 @@
42
42
  "license": "Apache-2.0",
43
43
  "dependencies": {
44
44
  "@babel/runtime-corejs3": "^7.20.7",
45
- "@swagger-api/apidom-core": "^1.0.0-beta.2",
46
- "@swagger-api/apidom-error": "^1.0.0-beta.2",
47
- "@swagger-api/apidom-ns-json-schema-draft-4": "^1.0.0-beta.2",
45
+ "@swagger-api/apidom-core": "^1.0.0-beta.4",
46
+ "@swagger-api/apidom-error": "^1.0.0-beta.4",
47
+ "@swagger-api/apidom-ns-json-schema-draft-4": "^1.0.0-beta.4",
48
48
  "@types/ramda": "~0.30.0",
49
49
  "ramda": "~0.30.0",
50
50
  "ramda-adjunct": "^5.0.0",
@@ -54,11 +54,11 @@
54
54
  "src/**/*.mjs",
55
55
  "src/**/*.cjs",
56
56
  "dist/",
57
- "types/dist.d.ts",
57
+ "types/apidom-ns-json-schema-draft-6.d.ts",
58
58
  "LICENSES",
59
59
  "NOTICE",
60
60
  "README.md",
61
61
  "CHANGELOG.md"
62
62
  ],
63
- "gitHead": "aa9027fa0a6de3d5a4bf840f120b874d6cdf5ada"
63
+ "gitHead": "aca988b356e303bd9aaa900d8ba3de49b3bb80be"
64
64
  }
@@ -6,6 +6,9 @@ var _apidomError = require("@swagger-api/apidom-error");
6
6
  var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-4");
7
7
  /* eslint-disable class-methods-use-this */
8
8
 
9
+ /**
10
+ * @public
11
+ */
9
12
  class JSONSchema extends _apidomNsJsonSchemaDraft.JSONSchemaElement {
10
13
  constructor(content, meta, attributes) {
11
14
  super(content, meta, attributes);
@@ -3,6 +3,9 @@ import { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
3
3
 
4
4
  /* eslint-disable class-methods-use-this */
5
5
 
6
+ /**
7
+ * @public
8
+ */
6
9
  class JSONSchema extends JSONSchemaElement {
7
10
  constructor(content, meta, attributes) {
8
11
  super(content, meta, attributes);
@@ -8,6 +8,7 @@ var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft
8
8
 
9
9
  /**
10
10
  * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6
11
+ * @public
11
12
  */
12
13
 
13
14
  class LinkDescription extends _apidomNsJsonSchemaDraft.LinkDescriptionElement {
@@ -4,6 +4,7 @@ import { LinkDescriptionElement } from '@swagger-api/apidom-ns-json-schema-draft
4
4
 
5
5
  /**
6
6
  * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6
7
+ * @public
7
8
  */
8
9
 
9
10
  class LinkDescription extends LinkDescriptionElement {
package/src/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  export { isRefElement, isLinkElement, isMemberElement, isObjectElement, isArrayElement, isBooleanElement, isNullElement, isElement, isNumberElement, isStringElement } from '@swagger-api/apidom-core';
2
- export { default as mediaTypes, JSONSchemaDraft6MediaTypes } from "./media-types.mjs"; // eslint-disable-next-line no-restricted-exports
2
+ export { default as mediaTypes, JSONSchemaDraft6MediaTypes } from "./media-types.mjs";
3
+ // eslint-disable-next-line no-restricted-exports
3
4
  export { default } from "./namespace.mjs";
4
5
  export { default as refractorPluginReplaceEmptyElement } from "./refractor/plugins/replace-empty-element.mjs";
5
6
  export { default as refract, createRefractor } from "./refractor/index.mjs";
@@ -4,6 +4,13 @@ exports.__esModule = true;
4
4
  exports.default = exports.JSONSchemaDraft6MediaTypes = void 0;
5
5
  var _ramda = require("ramda");
6
6
  var _apidomCore = require("@swagger-api/apidom-core");
7
+ /**
8
+ * @public
9
+ */
10
+
11
+ /**
12
+ * @public
13
+ */
7
14
  class JSONSchemaDraft6MediaTypes extends _apidomCore.MediaTypes {
8
15
  filterByFormat(format = 'generic') {
9
16
  const effectiveFormat = format === 'generic' ? 'schema;version' : format;
@@ -18,6 +25,10 @@ class JSONSchemaDraft6MediaTypes extends _apidomCore.MediaTypes {
18
25
  return (0, _ramda.last)(this.filterByFormat(format));
19
26
  }
20
27
  }
28
+
29
+ /**
30
+ * @public
31
+ */
21
32
  exports.JSONSchemaDraft6MediaTypes = JSONSchemaDraft6MediaTypes;
22
33
  const mediaTypes = new JSONSchemaDraft6MediaTypes('application/schema;version=draft-06', 'application/schema+json;version=draft-06', 'application/schema+yaml;version=draft-06');
23
34
  var _default = exports.default = mediaTypes;
@@ -1,5 +1,13 @@
1
1
  import { last } from 'ramda';
2
2
  import { MediaTypes } from '@swagger-api/apidom-core';
3
+
4
+ /**
5
+ * @public
6
+ */
7
+
8
+ /**
9
+ * @public
10
+ */
3
11
  export class JSONSchemaDraft6MediaTypes extends MediaTypes {
4
12
  filterByFormat(format = 'generic') {
5
13
  const effectiveFormat = format === 'generic' ? 'schema;version' : format;
@@ -14,5 +22,9 @@ export class JSONSchemaDraft6MediaTypes extends MediaTypes {
14
22
  return last(this.filterByFormat(format));
15
23
  }
16
24
  }
25
+
26
+ /**
27
+ * @public
28
+ */
17
29
  const mediaTypes = new JSONSchemaDraft6MediaTypes('application/schema;version=draft-06', 'application/schema+json;version=draft-06', 'application/schema+yaml;version=draft-06');
18
30
  export default mediaTypes;
package/src/namespace.cjs CHANGED
@@ -6,6 +6,9 @@ exports.default = void 0;
6
6
  var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-4");
7
7
  var _JSONSchema = _interopRequireDefault(require("./elements/JSONSchema.cjs"));
8
8
  var _LinkDescription = _interopRequireDefault(require("./elements/LinkDescription.cjs"));
9
+ /**
10
+ * @public
11
+ */
9
12
  const jsonSchemaDraft6 = {
10
13
  namespace: options => {
11
14
  const {
package/src/namespace.mjs CHANGED
@@ -1,6 +1,9 @@
1
1
  import { JSONReferenceElement, MediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
2
2
  import JSONSchemaElement from "./elements/JSONSchema.mjs";
3
3
  import LinkDescriptionElement from "./elements/LinkDescription.mjs";
4
+ /**
5
+ * @public
6
+ */
4
7
  const jsonSchemaDraft6 = {
5
8
  namespace: options => {
6
9
  const {
@@ -9,6 +9,9 @@ var _LinkDescription = _interopRequireDefault(require("./elements/LinkDescriptio
9
9
  var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-4");
10
10
  exports.isJSONReferenceElement = _apidomNsJsonSchemaDraft.isJSONReferenceElement;
11
11
  exports.isMediaElement = _apidomNsJsonSchemaDraft.isMediaElement;
12
+ /**
13
+ * @public
14
+ */
12
15
  const isJSONSchemaElement = exports.isJSONSchemaElement = (0, _apidomCore.createPredicate)(({
13
16
  hasBasicElementProps,
14
17
  isElementType,
@@ -16,6 +19,10 @@ const isJSONSchemaElement = exports.isJSONSchemaElement = (0, _apidomCore.create
16
19
  }) => {
17
20
  return element => element instanceof _JSONSchema.default || hasBasicElementProps(element) && isElementType('JSONSchemaDraft6', element) && primitiveEq('object', element);
18
21
  });
22
+
23
+ /**
24
+ * @public
25
+ */
19
26
  const isLinkDescriptionElement = exports.isLinkDescriptionElement = (0, _apidomCore.createPredicate)(({
20
27
  hasBasicElementProps,
21
28
  isElementType,
@@ -2,6 +2,10 @@ import { createPredicate } from '@swagger-api/apidom-core';
2
2
  import JSONSchemaElement from "./elements/JSONSchema.mjs";
3
3
  import LinkDescriptionElement from "./elements/LinkDescription.mjs";
4
4
  export { isJSONReferenceElement, isMediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
5
+
6
+ /**
7
+ * @public
8
+ */
5
9
  export const isJSONSchemaElement = createPredicate(({
6
10
  hasBasicElementProps,
7
11
  isElementType,
@@ -9,6 +13,10 @@ export const isJSONSchemaElement = createPredicate(({
9
13
  }) => {
10
14
  return element => element instanceof JSONSchemaElement || hasBasicElementProps(element) && isElementType('JSONSchemaDraft6', element) && primitiveEq('object', element);
11
15
  });
16
+
17
+ /**
18
+ * @public
19
+ */
12
20
  export const isLinkDescriptionElement = createPredicate(({
13
21
  hasBasicElementProps,
14
22
  isElementType,
@@ -8,6 +8,9 @@ var _apidomCore = require("@swagger-api/apidom-core");
8
8
  var _specification = _interopRequireDefault(require("./specification.cjs"));
9
9
  var _visitor = require("../traversal/visitor.cjs");
10
10
  var _toolbox = _interopRequireDefault(require("./toolbox.cjs"));
11
+ /**
12
+ * @public
13
+ */
11
14
  const refract = (value, {
12
15
  specPath = ['visitors', 'document', 'objects', 'JSONSchema', '$visitor'],
13
16
  plugins = [],
@@ -38,6 +41,10 @@ const refract = (value, {
38
41
  }
39
42
  });
40
43
  };
44
+
45
+ /**
46
+ * @public
47
+ */
41
48
  const createRefractor = specPath => (value, options = {}) => refract(value, {
42
49
  specPath,
43
50
  ...options
@@ -3,6 +3,9 @@ import { visit, dereference, refract as baseRefract, dispatchRefractorPlugins }
3
3
  import specification from "./specification.mjs";
4
4
  import { keyMap, getNodeType } from "../traversal/visitor.mjs";
5
5
  import createToolbox from "./toolbox.mjs";
6
+ /**
7
+ * @public
8
+ */
6
9
  const refract = (value, {
7
10
  specPath = ['visitors', 'document', 'objects', 'JSONSchema', '$visitor'],
8
11
  plugins = [],
@@ -33,6 +36,10 @@ const refract = (value, {
33
36
  }
34
37
  });
35
38
  };
39
+
40
+ /**
41
+ * @public
42
+ */
36
43
  export const createRefractor = specPath => (value, options = {}) => refract(value, {
37
44
  specPath,
38
45
  ...options
@@ -183,6 +183,10 @@ const findElementFactory = (ancestor, keyName) => {
183
183
  const keyMapping = schema[elementType] || schema[(0, _apidomCore.toValue)(ancestor.classes.first)];
184
184
  return typeof keyMapping === 'undefined' ? undefined : Object.prototype.hasOwnProperty.call(keyMapping, '[key: *]') ? keyMapping['[key: *]'] : keyMapping[keyName];
185
185
  };
186
+
187
+ /**
188
+ * @public
189
+ */
186
190
  const plugin = () => () => ({
187
191
  visitor: {
188
192
  StringElement(element, key, parent, path, ancestors) {
@@ -176,6 +176,10 @@ const findElementFactory = (ancestor, keyName) => {
176
176
  const keyMapping = schema[elementType] || schema[toValue(ancestor.classes.first)];
177
177
  return typeof keyMapping === 'undefined' ? undefined : Object.prototype.hasOwnProperty.call(keyMapping, '[key: *]') ? keyMapping['[key: *]'] : keyMapping[keyName];
178
178
  };
179
+
180
+ /**
181
+ * @public
182
+ */
179
183
  const plugin = () => () => ({
180
184
  visitor: {
181
185
  StringElement(element, key, parent, path, ancestors) {
@@ -3,6 +3,9 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
  var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-4");
6
+ /**
7
+ * @public
8
+ */
6
9
  class ExamplesVisitor extends _apidomNsJsonSchemaDraft.FallbackVisitor {
7
10
  ArrayElement(arrayElement) {
8
11
  const result = this.enter(arrayElement);
@@ -1,4 +1,7 @@
1
1
  import { FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
2
+ /**
3
+ * @public
4
+ */
2
5
  class ExamplesVisitor extends FallbackVisitor {
3
6
  ArrayElement(arrayElement) {
4
7
  const result = this.enter(arrayElement);
@@ -5,6 +5,13 @@ exports.default = void 0;
5
5
  var _tsMixer = require("ts-mixer");
6
6
  var _apidomCore = require("@swagger-api/apidom-core");
7
7
  var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-4");
8
+ /**
9
+ * @public
10
+ */
11
+
12
+ /**
13
+ * @public
14
+ */
8
15
  class ItemsVisitor extends (0, _tsMixer.Mixin)(_apidomNsJsonSchemaDraft.SpecificationVisitor, _apidomNsJsonSchemaDraft.ParentSchemaAwareVisitor, _apidomNsJsonSchemaDraft.FallbackVisitor) {
9
16
  ObjectElement(objectElement) {
10
17
  const specPath = (0, _apidomNsJsonSchemaDraft.isJSONReferenceLikeElement)(objectElement) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];
@@ -1,6 +1,14 @@
1
1
  import { Mixin } from 'ts-mixer';
2
2
  import { ArrayElement, BREAK } from '@swagger-api/apidom-core';
3
3
  import { SpecificationVisitor, FallbackVisitor, ParentSchemaAwareVisitor, isJSONReferenceLikeElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
4
+
5
+ /**
6
+ * @public
7
+ */
8
+
9
+ /**
10
+ * @public
11
+ */
4
12
  class ItemsVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {
5
13
  ObjectElement(objectElement) {
6
14
  const specPath = isJSONReferenceLikeElement(objectElement) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];
@@ -7,6 +7,13 @@ var _tsMixer = require("ts-mixer");
7
7
  var _ramda = require("ramda");
8
8
  var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-4");
9
9
  var _JSONSchema = _interopRequireDefault(require("../../../elements/JSONSchema.cjs"));
10
+ /**
11
+ * @public
12
+ */
13
+
14
+ /**
15
+ * @public
16
+ */
10
17
  class JSONSchemaVisitor extends (0, _tsMixer.Mixin)(_apidomNsJsonSchemaDraft.FixedFieldsVisitor, _apidomNsJsonSchemaDraft.FallbackVisitor) {
11
18
  constructor(options) {
12
19
  super(options);
@@ -2,6 +2,12 @@ import { Mixin } from 'ts-mixer';
2
2
  import { always } from 'ramda';
3
3
  import { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
4
4
  import JSONSchemaElement from "../../../elements/JSONSchema.mjs";
5
+ /**
6
+ * @public
7
+ */
8
+ /**
9
+ * @public
10
+ */
5
11
  class JSONSchemaVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {
6
12
  constructor(options) {
7
13
  super(options);
@@ -7,6 +7,13 @@ var _tsMixer = require("ts-mixer");
7
7
  var _ramda = require("ramda");
8
8
  var _apidomNsJsonSchemaDraft = require("@swagger-api/apidom-ns-json-schema-draft-4");
9
9
  var _LinkDescription = _interopRequireDefault(require("../../../../elements/LinkDescription.cjs"));
10
+ /**
11
+ * @public
12
+ */
13
+
14
+ /**
15
+ * @public
16
+ */
10
17
  class LinkDescriptionVisitor extends (0, _tsMixer.Mixin)(_apidomNsJsonSchemaDraft.FixedFieldsVisitor, _apidomNsJsonSchemaDraft.FallbackVisitor) {
11
18
  constructor(options) {
12
19
  super(options);
@@ -2,6 +2,12 @@ import { Mixin } from 'ts-mixer';
2
2
  import { always } from 'ramda';
3
3
  import { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
4
4
  import LinkDescriptionElement from "../../../../elements/LinkDescription.mjs";
5
+ /**
6
+ * @public
7
+ */
8
+ /**
9
+ * @public
10
+ */
5
11
  class LinkDescriptionVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {
6
12
  constructor(options) {
7
13
  super(options);
@@ -3,13 +3,19 @@
3
3
  exports.__esModule = true;
4
4
  exports.keyMap = exports.getNodeType = void 0;
5
5
  var _apidomCore = require("@swagger-api/apidom-core");
6
- // getNodeType :: Node -> String
6
+ /**
7
+ * @public
8
+ */
7
9
  const getNodeType = element => {
8
10
  if (!(0, _apidomCore.isElement)(element)) {
9
11
  return undefined;
10
12
  }
11
13
  return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;
12
14
  };
15
+
16
+ /**
17
+ * @public
18
+ */
13
19
  exports.getNodeType = getNodeType;
14
20
  const keyMap = exports.keyMap = {
15
21
  JSONSchemaDraft6Element: ['content'],
@@ -1,12 +1,18 @@
1
1
  import { keyMap as keyMapBase, isElement } from '@swagger-api/apidom-core';
2
2
 
3
- // getNodeType :: Node -> String
3
+ /**
4
+ * @public
5
+ */
4
6
  export const getNodeType = element => {
5
7
  if (!isElement(element)) {
6
8
  return undefined;
7
9
  }
8
10
  return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;
9
11
  };
12
+
13
+ /**
14
+ * @public
15
+ */
10
16
  export const keyMap = {
11
17
  JSONSchemaDraft6Element: ['content'],
12
18
  JSONReferenceElement: ['content'],
@@ -0,0 +1,539 @@
1
+ import { AllOfVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
2
+ import { AllOfVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
3
+ import { AlternatingVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
4
+ import { AlternatingVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
5
+ import { AnyOfVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
6
+ import { AnyOfVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
7
+ import { ArrayElement } from '@swagger-api/apidom-core';
8
+ import { Attributes } from '@swagger-api/apidom-core';
9
+ import { BooleanElement } from '@swagger-api/apidom-core';
10
+ import { Class } from 'ts-mixer/dist/types/types.js';
11
+ import { DefinitionsVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
12
+ import { DefinitionsVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
13
+ import { DependenciesVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
14
+ import { DependenciesVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
15
+ import { Element as Element_2 } from '@swagger-api/apidom-core';
16
+ import { ElementPredicate } from '@swagger-api/apidom-core';
17
+ import { EnumVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
18
+ import { FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
19
+ import { FallbackVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
20
+ import { FixedFieldsVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
21
+ import { FixedFieldsVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
22
+ import { isArrayElement } from '@swagger-api/apidom-core';
23
+ import { isBooleanElement } from '@swagger-api/apidom-core';
24
+ import { isElement } from '@swagger-api/apidom-core';
25
+ import { isJSONReferenceElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
26
+ import { isJSONReferenceLikeElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
27
+ import { isLinkElement } from '@swagger-api/apidom-core';
28
+ import { isMediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
29
+ import { isMemberElement } from '@swagger-api/apidom-core';
30
+ import { isNullElement } from '@swagger-api/apidom-core';
31
+ import { isNumberElement } from '@swagger-api/apidom-core';
32
+ import { isObjectElement } from '@swagger-api/apidom-core';
33
+ import { isRefElement } from '@swagger-api/apidom-core';
34
+ import { isStringElement } from '@swagger-api/apidom-core';
35
+ import { JSONReference$RefVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
36
+ import { JSONReferenceElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
37
+ import { JSONReferenceVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
38
+ import { ItemsVisitor as JSONSchemaDraft4ItemsVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
39
+ import { JSONSchemaElement as JSONSchemaElement_2 } from '@swagger-api/apidom-ns-json-schema-draft-4';
40
+ import { JSONSchemaVisitor as JSONSchemaVisitor_2 } from '@swagger-api/apidom-ns-json-schema-draft-4';
41
+ import { LinkDescriptionElement as LinkDescriptionElement_2 } from '@swagger-api/apidom-ns-json-schema-draft-4';
42
+ import { LinkDescriptionVisitor as LinkDescriptionVisitor_2 } from '@swagger-api/apidom-ns-json-schema-draft-4';
43
+ import { LinksVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
44
+ import { MapVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
45
+ import { MapVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
46
+ import { MediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
47
+ import { MediaTypes } from '@swagger-api/apidom-core';
48
+ import { MediaVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
49
+ import { Meta } from '@swagger-api/apidom-core';
50
+ import { Namespace } from 'minim';
51
+ import { NamespacePluginOptions } from '@swagger-api/apidom-core';
52
+ import { NumberElement } from '@swagger-api/apidom-core';
53
+ import { ObjectElement } from '@swagger-api/apidom-core';
54
+ import { OneOfVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
55
+ import { OneOfVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
56
+ import { ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
57
+ import { ParentSchemaAwareVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
58
+ import { PatternedFieldsVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
59
+ import { PatternedFieldsVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
60
+ import { PatternPropertiesVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
61
+ import { PatternPropertiesVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
62
+ import { PropertiesVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
63
+ import { PropertiesVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
64
+ import { RequiredVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
65
+ import { SchemaOrReferenceVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
66
+ import { SchemaOrReferenceVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
67
+ import { specificationObj as specificationObj_2 } from '@swagger-api/apidom-ns-json-schema-draft-4';
68
+ import { SpecificationVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
69
+ import { SpecificationVisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
70
+ import { SpecPath } from '@swagger-api/apidom-ns-json-schema-draft-4';
71
+ import { StringElement } from '@swagger-api/apidom-core';
72
+ import { TypeVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
73
+ import { Visitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
74
+ import { VisitorOptions } from '@swagger-api/apidom-ns-json-schema-draft-4';
75
+
76
+ export { AllOfVisitor }
77
+
78
+ export { AllOfVisitorOptions }
79
+
80
+ export { AlternatingVisitor }
81
+
82
+ export { AlternatingVisitorOptions }
83
+
84
+ export { AnyOfVisitor }
85
+
86
+ export { AnyOfVisitorOptions }
87
+
88
+ /**
89
+ * @public
90
+ */
91
+ export declare const createRefractor: (specPath: string[]) => (value: unknown, options?: {}) => Element_2;
92
+
93
+ export { DefinitionsVisitor }
94
+
95
+ export { DefinitionsVisitorOptions }
96
+
97
+ export { DependenciesVisitor }
98
+
99
+ export { DependenciesVisitorOptions }
100
+
101
+ /**
102
+ * @public
103
+ */
104
+ export declare class ExamplesVisitor extends FallbackVisitor {
105
+ readonly element: ArrayElement;
106
+ ArrayElement(arrayElement: ArrayElement): {};
107
+ }
108
+
109
+ export { FallbackVisitor }
110
+
111
+ export { FallbackVisitorOptions as ExamplesVisitorOptions }
112
+ export { FallbackVisitorOptions }
113
+
114
+ export { FixedFieldsVisitor }
115
+
116
+ export { FixedFieldsVisitorOptions }
117
+
118
+ /**
119
+ * @public
120
+ */
121
+ export declare type Format = 'generic' | 'json' | 'yaml';
122
+
123
+ /**
124
+ * @public
125
+ */
126
+ export declare const getNodeType: <T extends Element_2>(element: T) => string | undefined;
127
+
128
+ export { isArrayElement }
129
+
130
+ export { isBooleanElement }
131
+
132
+ export { isElement }
133
+
134
+ export { isJSONReferenceElement }
135
+
136
+ export { isJSONReferenceLikeElement }
137
+
138
+ /**
139
+ * @public
140
+ */
141
+ export declare const isJSONSchemaElement: ElementPredicate<JSONSchemaElement>;
142
+
143
+ /**
144
+ * @public
145
+ */
146
+ export declare const isLinkDescriptionElement: ElementPredicate<LinkDescriptionElement>;
147
+
148
+ export { isLinkElement }
149
+
150
+ export { isMediaElement }
151
+
152
+ export { isMemberElement }
153
+
154
+ export { isNullElement }
155
+
156
+ export { isNumberElement }
157
+
158
+ export { isObjectElement }
159
+
160
+ export { isRefElement }
161
+
162
+ export { isStringElement }
163
+
164
+ /**
165
+ * @public
166
+ */
167
+ export declare class ItemsVisitor extends ItemsVisitor_base {
168
+ element: ObjectElement | ArrayElement;
169
+ ObjectElement(objectElement: ObjectElement): {};
170
+ ArrayElement(arrayElement: ArrayElement): {};
171
+ BooleanElement(booleanElement: BooleanElement): {};
172
+ }
173
+
174
+ declare const ItemsVisitor_base: Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
175
+
176
+ /**
177
+ * @public
178
+ */
179
+ export declare interface ItemsVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
180
+ }
181
+
182
+ export { JSONReferenceElement }
183
+
184
+ export { JSONSchemaDraft4ItemsVisitor }
185
+
186
+ /**
187
+ * @public
188
+ */
189
+ declare const jsonSchemaDraft6: {
190
+ namespace: (options: NamespacePluginOptions) => Namespace;
191
+ };
192
+ export default jsonSchemaDraft6;
193
+
194
+ /**
195
+ * @public
196
+ */
197
+ export declare class JSONSchemaDraft6MediaTypes extends MediaTypes<string> {
198
+ filterByFormat(format?: Format): string[];
199
+ findBy(version?: string, format?: Format): string;
200
+ latest(format?: Format): string;
201
+ }
202
+
203
+ /**
204
+ * @public
205
+ */
206
+ export declare class JSONSchemaElement extends JSONSchemaElement_2 {
207
+ constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
208
+ /**
209
+ * Core vocabulary
210
+ *
211
+ * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-01
212
+ */
213
+ get idProp(): StringElement | undefined;
214
+ set idProp(id: StringElement | undefined);
215
+ get $id(): StringElement | undefined;
216
+ set $id($id: StringElement | undefined);
217
+ /**
218
+ * Validation vocabulary
219
+ *
220
+ * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01
221
+ */
222
+ /**
223
+ * Validation keywords for numeric instances (number and integer)
224
+ */
225
+ get exclusiveMaximum(): NumberElement | undefined;
226
+ set exclusiveMaximum(exclusiveMaximum: NumberElement | undefined);
227
+ get exclusiveMinimum(): NumberElement | undefined;
228
+ set exclusiveMinimum(exclusiveMinimum: NumberElement | undefined);
229
+ /**
230
+ * Validation keywords for arrays
231
+ */
232
+ get containsProp(): this | BooleanElement | JSONReferenceElement | undefined;
233
+ set containsProp(contains: this | BooleanElement | JSONReferenceElement | undefined);
234
+ get items(): this | BooleanElement | JSONReferenceElement | ArrayElement | undefined | any;
235
+ set items(items: this | BooleanElement | JSONReferenceElement | ArrayElement | undefined | any);
236
+ /**
237
+ * Validation keywords for objects
238
+ */
239
+ get propertyNames(): this | BooleanElement | JSONReferenceElement | undefined;
240
+ set propertyNames(propertyNames: this | BooleanElement | JSONReferenceElement | undefined);
241
+ /**
242
+ * Validation keywords for any instance type
243
+ */
244
+ get const(): Element_2 | undefined;
245
+ set const(constValue: Element_2 | undefined);
246
+ get not(): this | BooleanElement | JSONReferenceElement | undefined | any;
247
+ set not(not: this | BooleanElement | JSONReferenceElement | undefined | any);
248
+ /**
249
+ * Metadata keywords
250
+ *
251
+ * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01#section-7
252
+ */
253
+ get examples(): ArrayElement | undefined;
254
+ set examples(examples: ArrayElement | undefined);
255
+ }
256
+
257
+ /**
258
+ * @public
259
+ */
260
+ export declare class JSONSchemaVisitor extends JSONSchemaVisitor_base {
261
+ element: JSONSchemaElement;
262
+ protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
263
+ constructor(options: JSONSchemaVisitorOptions);
264
+ ObjectElement(objectElement: ObjectElement): {};
265
+ BooleanElement(booleanElement: BooleanElement): {};
266
+ }
267
+
268
+ declare const JSONSchemaVisitor_base: Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
269
+
270
+ /**
271
+ * @public
272
+ */
273
+ export declare interface JSONSchemaVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
274
+ }
275
+
276
+ /**
277
+ * @public
278
+ */
279
+ export declare const keyMap: {
280
+ ObjectElement: string[];
281
+ ArrayElement: string[];
282
+ MemberElement: string[];
283
+ StringElement: never[];
284
+ BooleanElement: never[];
285
+ NumberElement: never[];
286
+ NullElement: never[];
287
+ RefElement: never[];
288
+ LinkElement: never[];
289
+ Annotation: never[];
290
+ Comment: never[];
291
+ ParseResultElement: string[];
292
+ SourceMap: string[];
293
+ JSONSchemaDraft6Element: string[];
294
+ JSONReferenceElement: string[];
295
+ MediaElement: string[];
296
+ LinkDescriptionElement: string[];
297
+ };
298
+
299
+ /**
300
+ * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6
301
+ * @public
302
+ */
303
+ export declare class LinkDescriptionElement extends LinkDescriptionElement_2 {
304
+ get hrefSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined;
305
+ set hrefSchema(hrefSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined);
306
+ get targetSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined | any;
307
+ set targetSchema(targetSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined | any);
308
+ get schema(): JSONSchemaElement | JSONReferenceElement | undefined;
309
+ set schema(schema: JSONSchemaElement | JSONReferenceElement | undefined);
310
+ get submissionSchema(): JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined;
311
+ set submissionSchema(submissionSchema: JSONSchemaElement | BooleanElement | JSONReferenceElement | undefined);
312
+ get method(): StringElement | undefined;
313
+ set method(method: StringElement | undefined);
314
+ get encType(): StringElement | undefined;
315
+ set encType(encType: StringElement | undefined);
316
+ get submissionEncType(): StringElement | undefined;
317
+ set submissionEncType(submissionEncType: StringElement | undefined);
318
+ }
319
+
320
+ /**
321
+ * @public
322
+ */
323
+ export declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_base {
324
+ readonly element: LinkDescriptionElement;
325
+ protected readonly specPath: SpecPath<['document', 'objects', 'LinkDescription']>;
326
+ constructor(options: LinkDescriptionVisitorOptions);
327
+ }
328
+
329
+ declare const LinkDescriptionVisitor_base: Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
330
+
331
+ /**
332
+ * @public
333
+ */
334
+ export declare interface LinkDescriptionVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
335
+ }
336
+
337
+ export { MapVisitor }
338
+
339
+ export { MapVisitorOptions }
340
+
341
+ export { MediaElement }
342
+
343
+ /**
344
+ * @public
345
+ */
346
+ export declare const mediaTypes: JSONSchemaDraft6MediaTypes;
347
+
348
+ export { OneOfVisitor }
349
+
350
+ export { OneOfVisitorOptions }
351
+
352
+ export { ParentSchemaAwareVisitor }
353
+
354
+ export { ParentSchemaAwareVisitorOptions }
355
+
356
+ export { PatternedFieldsVisitor }
357
+
358
+ export { PatternedFieldsVisitorOptions }
359
+
360
+ export { PatternPropertiesVisitor }
361
+
362
+ export { PatternPropertiesVisitorOptions }
363
+
364
+ export { PropertiesVisitor }
365
+
366
+ export { PropertiesVisitorOptions }
367
+
368
+ /**
369
+ * @public
370
+ */
371
+ export declare const refract: <T extends Element_2>(value: unknown, { specPath, plugins, specificationObj, }?: {
372
+ specPath?: string[] | undefined;
373
+ plugins?: never[] | undefined;
374
+ specificationObj?: {
375
+ visitors: {
376
+ value: FallbackVisitor;
377
+ JSONSchemaOrJSONReferenceVisitor: SchemaOrReferenceVisitor;
378
+ document: {
379
+ objects: {
380
+ JSONSchema: {
381
+ $visitor: JSONSchemaVisitor_2;
382
+ fixedFields: {
383
+ id: {
384
+ $ref: string;
385
+ };
386
+ $schema: {
387
+ $ref: string;
388
+ };
389
+ multipleOf: {
390
+ $ref: string;
391
+ };
392
+ maximum: {
393
+ $ref: string;
394
+ };
395
+ exclusiveMaximum: {
396
+ $ref: string;
397
+ };
398
+ minimum: {
399
+ $ref: string;
400
+ };
401
+ exclusiveMinimum: {
402
+ $ref: string;
403
+ };
404
+ maxLength: {
405
+ $ref: string;
406
+ };
407
+ minLength: {
408
+ $ref: string;
409
+ };
410
+ pattern: {
411
+ $ref: string;
412
+ };
413
+ additionalItems: SchemaOrReferenceVisitor;
414
+ items: JSONSchemaDraft4ItemsVisitor;
415
+ maxItems: {
416
+ $ref: string;
417
+ };
418
+ minItems: {
419
+ $ref: string;
420
+ };
421
+ uniqueItems: {
422
+ $ref: string;
423
+ };
424
+ maxProperties: {
425
+ $ref: string;
426
+ };
427
+ minProperties: {
428
+ $ref: string;
429
+ };
430
+ required: RequiredVisitor;
431
+ properties: PropertiesVisitor;
432
+ additionalProperties: SchemaOrReferenceVisitor;
433
+ patternProperties: PatternPropertiesVisitor;
434
+ dependencies: DependenciesVisitor;
435
+ enum: EnumVisitor;
436
+ type: TypeVisitor;
437
+ allOf: AllOfVisitor;
438
+ anyOf: AnyOfVisitor;
439
+ oneOf: OneOfVisitor;
440
+ not: SchemaOrReferenceVisitor;
441
+ definitions: DefinitionsVisitor;
442
+ title: {
443
+ $ref: string;
444
+ };
445
+ description: {
446
+ $ref: string;
447
+ };
448
+ default: {
449
+ $ref: string;
450
+ };
451
+ format: {
452
+ $ref: string;
453
+ };
454
+ base: {
455
+ $ref: string;
456
+ };
457
+ links: LinksVisitor;
458
+ media: {
459
+ $ref: string;
460
+ };
461
+ readOnly: {
462
+ $ref: string;
463
+ };
464
+ };
465
+ };
466
+ JSONReference: {
467
+ $visitor: JSONReferenceVisitor;
468
+ fixedFields: {
469
+ $ref: JSONReference$RefVisitor;
470
+ };
471
+ };
472
+ Media: {
473
+ $visitor: MediaVisitor;
474
+ fixedFields: {
475
+ binaryEncoding: {
476
+ $ref: string;
477
+ };
478
+ type: {
479
+ $ref: string;
480
+ };
481
+ };
482
+ };
483
+ LinkDescription: {
484
+ $visitor: LinkDescriptionVisitor_2;
485
+ fixedFields: {
486
+ href: {
487
+ $ref: string;
488
+ };
489
+ rel: {
490
+ $ref: string;
491
+ };
492
+ title: {
493
+ $ref: string;
494
+ };
495
+ targetSchema: SchemaOrReferenceVisitor;
496
+ mediaType: {
497
+ $ref: string;
498
+ };
499
+ method: {
500
+ $ref: string;
501
+ };
502
+ encType: {
503
+ $ref: string;
504
+ };
505
+ schema: SchemaOrReferenceVisitor;
506
+ };
507
+ };
508
+ };
509
+ };
510
+ };
511
+ } | undefined;
512
+ }) => T;
513
+
514
+ /**
515
+ * @public
516
+ */
517
+ export declare const refractorPluginReplaceEmptyElement: () => () => {
518
+ visitor: {
519
+ StringElement(element: StringElement, key: any, parent: any, path: any, ancestors: any[]): any;
520
+ };
521
+ };
522
+
523
+ export { SchemaOrReferenceVisitor }
524
+
525
+ export { SchemaOrReferenceVisitorOptions }
526
+
527
+ export declare const specificationObj: typeof specificationObj_2;
528
+
529
+ export { SpecificationVisitor }
530
+
531
+ export { SpecificationVisitorOptions }
532
+
533
+ export { SpecPath }
534
+
535
+ export { Visitor }
536
+
537
+ export { VisitorOptions }
538
+
539
+ export { }
package/types/dist.d.ts DELETED
@@ -1,304 +0,0 @@
1
- import * as _swagger_api_apidom_core from '@swagger-api/apidom-core';
2
- import { MediaTypes, NamespacePluginOptions, StringElement, Element, Meta, Attributes, NumberElement, BooleanElement, ArrayElement, ObjectElement } from '@swagger-api/apidom-core';
3
- export { isArrayElement, isBooleanElement, isElement, isLinkElement, isMemberElement, isNullElement, isNumberElement, isObjectElement, isRefElement, isStringElement } from '@swagger-api/apidom-core';
4
- import * as minim from 'minim';
5
- import * as _swagger_api_apidom_ns_json_schema_draft_4 from '@swagger-api/apidom-ns-json-schema-draft-4';
6
- import { specificationObj, JSONSchemaElement, JSONReferenceElement, LinkDescriptionElement, FixedFieldsVisitorOptions, FallbackVisitorOptions, SpecPath, FixedFieldsVisitor, FallbackVisitor, SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, SpecificationVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
7
- export { AllOfVisitorOptions, AlternatingVisitor, AlternatingVisitorOptions, AnyOfVisitorOptions, DefinitionsVisitorOptions, DependenciesVisitorOptions, FallbackVisitorOptions as ExamplesVisitorOptions, FallbackVisitor, FallbackVisitorOptions, FixedFieldsVisitor, FixedFieldsVisitorOptions, JSONReferenceElement, MapVisitor, MapVisitorOptions, MediaElement, OneOfVisitorOptions, ParentSchemaAwareVisitor, ParentSchemaAwareVisitorOptions, PatternPropertiesVisitorOptions, PatternedFieldsVisitor, PatternedFieldsVisitorOptions, PropertiesVisitorOptions, SchemaOrReferenceVisitorOptions, SpecPath, SpecificationVisitor, SpecificationVisitorOptions, Visitor, VisitorOptions, isJSONReferenceElement, isJSONReferenceLikeElement, isMediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
8
- import * as ts_mixer_dist_types_types_js from 'ts-mixer/dist/types/types.js';
9
-
10
- type Format = 'generic' | 'json' | 'yaml';
11
- declare class JSONSchemaDraft6MediaTypes extends MediaTypes<string> {
12
- filterByFormat(format?: Format): string[];
13
- findBy(version?: string, format?: Format): string;
14
- latest(format?: Format): string;
15
- }
16
- declare const mediaTypes: JSONSchemaDraft6MediaTypes;
17
-
18
- declare const jsonSchemaDraft6: {
19
- namespace: (options: NamespacePluginOptions) => minim.Namespace;
20
- };
21
-
22
- declare const plugin: () => () => {
23
- visitor: {
24
- StringElement(element: StringElement, key: any, parent: any, path: any, ancestors: any[]): any;
25
- };
26
- };
27
-
28
- declare const refract: <T extends Element>(value: unknown, { specPath, plugins, specificationObj, }?: {
29
- specPath?: string[] | undefined;
30
- plugins?: never[] | undefined;
31
- specificationObj?: {
32
- visitors: {
33
- value: typeof _swagger_api_apidom_ns_json_schema_draft_4.FallbackVisitor;
34
- JSONSchemaOrJSONReferenceVisitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
35
- document: {
36
- objects: {
37
- JSONSchema: {
38
- $visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONSchemaVisitor;
39
- fixedFields: {
40
- id: {
41
- $ref: string;
42
- };
43
- $schema: {
44
- $ref: string;
45
- };
46
- multipleOf: {
47
- $ref: string;
48
- };
49
- maximum: {
50
- $ref: string;
51
- };
52
- exclusiveMaximum: {
53
- $ref: string;
54
- };
55
- minimum: {
56
- $ref: string;
57
- };
58
- exclusiveMinimum: {
59
- $ref: string;
60
- };
61
- maxLength: {
62
- $ref: string;
63
- };
64
- minLength: {
65
- $ref: string;
66
- };
67
- pattern: {
68
- $ref: string;
69
- };
70
- additionalItems: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
71
- items: typeof _swagger_api_apidom_ns_json_schema_draft_4.ItemsVisitor;
72
- maxItems: {
73
- $ref: string;
74
- };
75
- minItems: {
76
- $ref: string;
77
- };
78
- uniqueItems: {
79
- $ref: string;
80
- };
81
- maxProperties: {
82
- $ref: string;
83
- };
84
- minProperties: {
85
- $ref: string;
86
- };
87
- required: typeof _swagger_api_apidom_ns_json_schema_draft_4.RequiredVisitor;
88
- properties: typeof _swagger_api_apidom_ns_json_schema_draft_4.PropertiesVisitor;
89
- additionalProperties: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
90
- patternProperties: typeof _swagger_api_apidom_ns_json_schema_draft_4.PatternPropertiesVisitor;
91
- dependencies: typeof _swagger_api_apidom_ns_json_schema_draft_4.DependenciesVisitor;
92
- enum: typeof _swagger_api_apidom_ns_json_schema_draft_4.EnumVisitor;
93
- type: typeof _swagger_api_apidom_ns_json_schema_draft_4.TypeVisitor;
94
- allOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.AllOfVisitor;
95
- anyOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.AnyOfVisitor;
96
- oneOf: typeof _swagger_api_apidom_ns_json_schema_draft_4.OneOfVisitor;
97
- not: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
98
- definitions: typeof _swagger_api_apidom_ns_json_schema_draft_4.DefinitionsVisitor;
99
- title: {
100
- $ref: string;
101
- };
102
- description: {
103
- $ref: string;
104
- };
105
- default: {
106
- $ref: string;
107
- };
108
- format: {
109
- $ref: string;
110
- };
111
- base: {
112
- $ref: string;
113
- };
114
- links: typeof _swagger_api_apidom_ns_json_schema_draft_4.LinksVisitor;
115
- media: {
116
- $ref: string;
117
- };
118
- readOnly: {
119
- $ref: string;
120
- };
121
- };
122
- };
123
- JSONReference: {
124
- $visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONReferenceVisitor;
125
- fixedFields: {
126
- $ref: typeof _swagger_api_apidom_ns_json_schema_draft_4.JSONReference$RefVisitor;
127
- };
128
- };
129
- Media: {
130
- $visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.MediaVisitor;
131
- fixedFields: {
132
- binaryEncoding: {
133
- $ref: string;
134
- };
135
- type: {
136
- $ref: string;
137
- };
138
- };
139
- };
140
- LinkDescription: {
141
- $visitor: typeof _swagger_api_apidom_ns_json_schema_draft_4.LinkDescriptionVisitor;
142
- fixedFields: {
143
- href: {
144
- $ref: string;
145
- };
146
- rel: {
147
- $ref: string;
148
- };
149
- title: {
150
- $ref: string;
151
- };
152
- targetSchema: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
153
- mediaType: {
154
- $ref: string;
155
- };
156
- method: {
157
- $ref: string;
158
- };
159
- encType: {
160
- $ref: string;
161
- };
162
- schema: typeof _swagger_api_apidom_ns_json_schema_draft_4.SchemaOrReferenceVisitor;
163
- };
164
- };
165
- };
166
- };
167
- };
168
- } | undefined;
169
- }) => T;
170
- declare const createRefractor: (specPath: string[]) => (value: unknown, options?: {}) => Element;
171
-
172
- declare const _default: typeof specificationObj;
173
-
174
- declare class JSONSchema extends JSONSchemaElement {
175
- constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
176
- /**
177
- * Core vocabulary
178
- *
179
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-01
180
- */
181
- get idProp(): StringElement | undefined;
182
- set idProp(id: StringElement | undefined);
183
- get $id(): StringElement | undefined;
184
- set $id($id: StringElement | undefined);
185
- /**
186
- * Validation vocabulary
187
- *
188
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01
189
- */
190
- /**
191
- * Validation keywords for numeric instances (number and integer)
192
- */
193
- get exclusiveMaximum(): NumberElement | undefined;
194
- set exclusiveMaximum(exclusiveMaximum: NumberElement | undefined);
195
- get exclusiveMinimum(): NumberElement | undefined;
196
- set exclusiveMinimum(exclusiveMinimum: NumberElement | undefined);
197
- /**
198
- * Validation keywords for arrays
199
- */
200
- get containsProp(): this | BooleanElement | JSONReferenceElement | undefined;
201
- set containsProp(contains: this | BooleanElement | JSONReferenceElement | undefined);
202
- get items(): this | BooleanElement | JSONReferenceElement | ArrayElement | undefined | any;
203
- set items(items: this | BooleanElement | JSONReferenceElement | ArrayElement | undefined | any);
204
- /**
205
- * Validation keywords for objects
206
- */
207
- get propertyNames(): this | BooleanElement | JSONReferenceElement | undefined;
208
- set propertyNames(propertyNames: this | BooleanElement | JSONReferenceElement | undefined);
209
- /**
210
- * Validation keywords for any instance type
211
- */
212
- get const(): Element | undefined;
213
- set const(constValue: Element | undefined);
214
- get not(): this | BooleanElement | JSONReferenceElement | undefined | any;
215
- set not(not: this | BooleanElement | JSONReferenceElement | undefined | any);
216
- /**
217
- * Metadata keywords
218
- *
219
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01#section-7
220
- */
221
- get examples(): ArrayElement | undefined;
222
- set examples(examples: ArrayElement | undefined);
223
- }
224
-
225
- /**
226
- * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6
227
- */
228
- declare class LinkDescription extends LinkDescriptionElement {
229
- get hrefSchema(): JSONSchema | BooleanElement | JSONReferenceElement | undefined;
230
- set hrefSchema(hrefSchema: JSONSchema | BooleanElement | JSONReferenceElement | undefined);
231
- get targetSchema(): JSONSchema | BooleanElement | JSONReferenceElement | undefined | any;
232
- set targetSchema(targetSchema: JSONSchema | BooleanElement | JSONReferenceElement | undefined | any);
233
- get schema(): JSONSchema | JSONReferenceElement | undefined;
234
- set schema(schema: JSONSchema | JSONReferenceElement | undefined);
235
- get submissionSchema(): JSONSchema | BooleanElement | JSONReferenceElement | undefined;
236
- set submissionSchema(submissionSchema: JSONSchema | BooleanElement | JSONReferenceElement | undefined);
237
- get method(): StringElement | undefined;
238
- set method(method: StringElement | undefined);
239
- get encType(): StringElement | undefined;
240
- set encType(encType: StringElement | undefined);
241
- get submissionEncType(): StringElement | undefined;
242
- set submissionEncType(submissionEncType: StringElement | undefined);
243
- }
244
-
245
- declare const isJSONSchemaElement: _swagger_api_apidom_core.ElementPredicate<JSONSchema>;
246
- declare const isLinkDescriptionElement: _swagger_api_apidom_core.ElementPredicate<LinkDescription>;
247
-
248
- interface LinkDescriptionVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
249
- }
250
- declare const LinkDescriptionVisitor_base: ts_mixer_dist_types_types_js.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
251
- declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_base {
252
- readonly element: LinkDescription;
253
- protected readonly specPath: SpecPath<['document', 'objects', 'LinkDescription']>;
254
- constructor(options: LinkDescriptionVisitorOptions);
255
- }
256
-
257
- interface JSONSchemaVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {
258
- }
259
- declare const JSONSchemaVisitor_base: ts_mixer_dist_types_types_js.Class<any[], FixedFieldsVisitor & FallbackVisitor, typeof FixedFieldsVisitor & typeof FallbackVisitor>;
260
- declare class JSONSchemaVisitor extends JSONSchemaVisitor_base {
261
- element: JSONSchema;
262
- protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
263
- constructor(options: JSONSchemaVisitorOptions);
264
- ObjectElement(objectElement: ObjectElement): {};
265
- BooleanElement(booleanElement: BooleanElement): {};
266
- }
267
-
268
- declare class ExamplesVisitor extends FallbackVisitor {
269
- readonly element: ArrayElement;
270
- ArrayElement(arrayElement: ArrayElement): {};
271
- }
272
-
273
- interface ItemsVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
274
- }
275
- declare const ItemsVisitor_base: ts_mixer_dist_types_types_js.Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
276
- declare class ItemsVisitor extends ItemsVisitor_base {
277
- element: ObjectElement | ArrayElement;
278
- ObjectElement(objectElement: ObjectElement): {};
279
- ArrayElement(arrayElement: ArrayElement): {};
280
- BooleanElement(booleanElement: BooleanElement): {};
281
- }
282
-
283
- declare const getNodeType: <T extends Element>(element: T) => string | undefined;
284
- declare const keyMap: {
285
- ObjectElement: string[];
286
- ArrayElement: string[];
287
- MemberElement: string[];
288
- StringElement: never[];
289
- BooleanElement: never[];
290
- NumberElement: never[];
291
- NullElement: never[];
292
- RefElement: never[];
293
- LinkElement: never[];
294
- Annotation: never[];
295
- Comment: never[];
296
- ParseResultElement: string[];
297
- SourceMap: string[];
298
- JSONSchemaDraft6Element: string[];
299
- JSONReferenceElement: string[];
300
- MediaElement: string[];
301
- LinkDescriptionElement: string[];
302
- };
303
-
304
- export { ExamplesVisitor, ItemsVisitor, type ItemsVisitorOptions, JSONSchemaDraft6MediaTypes, JSONSchema as JSONSchemaElement, JSONSchemaVisitor, type JSONSchemaVisitorOptions, LinkDescription as LinkDescriptionElement, LinkDescriptionVisitor, type LinkDescriptionVisitorOptions, createRefractor, jsonSchemaDraft6 as default, getNodeType, isJSONSchemaElement, isLinkDescriptionElement, keyMap, mediaTypes, refract, plugin as refractorPluginReplaceEmptyElement, _default as specificationObj };