@speclynx/apidom-parser-adapter-json-schema-yaml-2020-12 1.12.2 → 2.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speclynx/apidom-parser-adapter-json-schema-yaml-2020-12",
3
- "version": "1.12.2",
3
+ "version": "2.1.0",
4
4
  "description": "Parser adapter for parsing YAML documents into JSON Schema 2020-12 namespace.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -44,10 +44,10 @@
44
44
  "license": "Apache-2.0",
45
45
  "dependencies": {
46
46
  "@babel/runtime-corejs3": "^7.28.4",
47
- "@speclynx/apidom-core": "^1.12.2",
48
- "@speclynx/apidom-ns-json-schema-2020-12": "^1.12.2",
49
- "@speclynx/apidom-parser-adapter-yaml-1-2": "^1.12.2",
50
- "@types/ramda": "~0.30.0",
47
+ "@speclynx/apidom-core": "^2.1.0",
48
+ "@speclynx/apidom-datamodel": "^2.1.0",
49
+ "@speclynx/apidom-ns-json-schema-2020-12": "^2.1.0",
50
+ "@speclynx/apidom-parser-adapter-yaml-1-2": "^2.1.0",
51
51
  "ramda": "~0.32.0",
52
52
  "ramda-adjunct": "^6.0.0"
53
53
  },
@@ -61,5 +61,5 @@
61
61
  "README.md",
62
62
  "CHANGELOG.md"
63
63
  ],
64
- "gitHead": "8c77c8183cb058797925e09a0b5399612e3a2e39"
64
+ "gitHead": "dd02cfbbe82b0a31c6e7c444cec140e740e1c6e9"
65
65
  }
package/src/adapter.cjs CHANGED
@@ -6,7 +6,7 @@ exports.__esModule = true;
6
6
  exports.parse = exports.namespace = exports.mediaTypes = exports.detectionRegExp = exports.detect = void 0;
7
7
  var _ramda = require("ramda");
8
8
  var _ramdaAdjunct = require("ramda-adjunct");
9
- var _apidomCore = require("@speclynx/apidom-core");
9
+ var _apidomDatamodel = require("@speclynx/apidom-datamodel");
10
10
  var _apidomParserAdapterYaml = require("@speclynx/apidom-parser-adapter-yaml-1-2");
11
11
  var _apidomNsJsonSchema = _interopRequireWildcard(require("@speclynx/apidom-ns-json-schema-2020-12"));
12
12
  var _mediaTypes = _interopRequireDefault(require("./media-types.cjs"));
@@ -33,7 +33,7 @@ const parse = async (source, options = {}) => {
33
33
  result
34
34
  } = parseResultElement;
35
35
  if ((0, _ramdaAdjunct.isNotUndefined)(result)) {
36
- const jsonSchemaElement = _apidomNsJsonSchema.JSONSchemaElement.refract(result, refractorOpts);
36
+ const jsonSchemaElement = (0, _apidomNsJsonSchema.refractJSONSchema)(result, refractorOpts);
37
37
  jsonSchemaElement.classes.push('result');
38
38
  parseResultElement.replaceResult(jsonSchemaElement);
39
39
  }
@@ -44,4 +44,4 @@ const parse = async (source, options = {}) => {
44
44
  * @public
45
45
  */
46
46
  exports.parse = parse;
47
- const namespace = exports.namespace = (0, _apidomCore.createNamespace)(_apidomNsJsonSchema.default);
47
+ const namespace = exports.namespace = new _apidomDatamodel.Namespace().use(_apidomNsJsonSchema.default);
package/src/adapter.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { propOr, omit } from 'ramda';
2
2
  import { isNotUndefined } from 'ramda-adjunct';
3
- import { createNamespace } from '@speclynx/apidom-core';
3
+ import { Namespace } from '@speclynx/apidom-datamodel';
4
4
  import { parse as parseYAML, detect as detectYAML } from '@speclynx/apidom-parser-adapter-yaml-1-2';
5
- import jsonSchemaNamespace, { JSONSchemaElement } from '@speclynx/apidom-ns-json-schema-2020-12';
5
+ import jsonSchemaNamespace, { refractJSONSchema } from '@speclynx/apidom-ns-json-schema-2020-12';
6
6
  export { default as mediaTypes } from "./media-types.mjs";
7
7
  /**
8
8
  * @public
@@ -25,7 +25,7 @@ export const parse = async (source, options = {}) => {
25
25
  result
26
26
  } = parseResultElement;
27
27
  if (isNotUndefined(result)) {
28
- const jsonSchemaElement = JSONSchemaElement.refract(result, refractorOpts);
28
+ const jsonSchemaElement = refractJSONSchema(result, refractorOpts);
29
29
  jsonSchemaElement.classes.push('result');
30
30
  parseResultElement.replaceResult(jsonSchemaElement);
31
31
  }
@@ -35,4 +35,4 @@ export const parse = async (source, options = {}) => {
35
35
  /**
36
36
  * @public
37
37
  */
38
- export const namespace = createNamespace(jsonSchemaNamespace);
38
+ export const namespace = new Namespace().use(jsonSchemaNamespace);
@@ -1,6 +1,6 @@
1
1
  import { JSONSchema202012MediaTypes } from '@speclynx/apidom-ns-json-schema-2020-12';
2
- import { Namespace } from '@speclynx/apidom-core';
3
- import { ParseResultElement } from '@speclynx/apidom-core';
2
+ import { Namespace } from '@speclynx/apidom-datamodel';
3
+ import { ParseResultElement } from '@speclynx/apidom-datamodel';
4
4
 
5
5
  /**
6
6
  * @public