@speclynx/apidom-parser-adapter-json-schema-yaml-2020-12 1.12.2 → 2.0.1
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 +19 -0
- package/NOTICE +16 -7
- package/dist/167.apidom-parser-adapter-json-schema-yaml-2020-12.browser.min.js +1 -1
- package/dist/451.apidom-parser-adapter-json-schema-yaml-2020-12.browser.min.js +1 -1
- package/dist/apidom-parser-adapter-json-schema-yaml-2020-12.browser.js +18115 -13764
- package/dist/apidom-parser-adapter-json-schema-yaml-2020-12.browser.min.js +1 -1
- package/package.json +6 -6
- package/src/adapter.cjs +3 -3
- package/src/adapter.mjs +4 -4
- package/types/apidom-parser-adapter-json-schema-yaml-2020-12.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speclynx/apidom-parser-adapter-json-schema-yaml-2020-12",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
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": "^
|
|
48
|
-
"@speclynx/apidom-
|
|
49
|
-
"@speclynx/apidom-
|
|
50
|
-
"@
|
|
47
|
+
"@speclynx/apidom-core": "^2.0.1",
|
|
48
|
+
"@speclynx/apidom-datamodel": "^2.0.1",
|
|
49
|
+
"@speclynx/apidom-ns-json-schema-2020-12": "^2.0.1",
|
|
50
|
+
"@speclynx/apidom-parser-adapter-yaml-1-2": "^2.0.1",
|
|
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": "
|
|
64
|
+
"gitHead": "6a9caf87f445f76ffd69afa760990ffa784bc82d"
|
|
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
|
|
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.
|
|
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 =
|
|
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 {
|
|
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, {
|
|
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 =
|
|
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 =
|
|
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-
|
|
3
|
-
import { ParseResultElement } from '@speclynx/apidom-
|
|
2
|
+
import { Namespace } from '@speclynx/apidom-datamodel';
|
|
3
|
+
import { ParseResultElement } from '@speclynx/apidom-datamodel';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @public
|