@jentic/arazzo-parser 1.0.0-alpha.28 → 1.0.0-alpha.29
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": "@jentic/arazzo-parser",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.29",
|
|
4
4
|
"description": "Parser for Arazzo Documents producing SpecLynx ApiDOM data model.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arazzo",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"README.md",
|
|
77
77
|
"CHANGELOG.md"
|
|
78
78
|
],
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "a7bdecff9f1be26db76f0118fc839abd417bfc62"
|
|
80
80
|
}
|
package/src/parse-arazzo.cjs
CHANGED
|
@@ -179,7 +179,7 @@ async function parse(source, options = {}) {
|
|
|
179
179
|
source = 'memory://arazzo.yaml';
|
|
180
180
|
sourceProvenance = '[inline YAML]';
|
|
181
181
|
} else {
|
|
182
|
-
sourceProvenance = source;
|
|
182
|
+
sourceProvenance = _empty.url.isHttpUrl(source) || _empty.url.getProtocol(source) === 'file' || _empty.url.isURI(`file://${source}`) ? source : '[inline CONTENT]';
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
// next we assume that source is either file system URI or HTTP(S) URL
|
package/src/parse-arazzo.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parse as parseURI, mergeOptions, UnmatchedParserError } from '@speclynx/apidom-reference/configuration/empty';
|
|
1
|
+
import { url, parse as parseURI, mergeOptions, UnmatchedParserError } from '@speclynx/apidom-reference/configuration/empty';
|
|
2
2
|
import ArazzoJSON1Parser from '@speclynx/apidom-reference/parse/parsers/arazzo-json-1';
|
|
3
3
|
import ArazzoYAML1Parser from '@speclynx/apidom-reference/parse/parsers/arazzo-yaml-1';
|
|
4
4
|
import OpenApiJSON2Parser from '@speclynx/apidom-reference/parse/parsers/openapi-json-2';
|
|
@@ -172,7 +172,7 @@ export async function parse(source, options = {}) {
|
|
|
172
172
|
source = 'memory://arazzo.yaml';
|
|
173
173
|
sourceProvenance = '[inline YAML]';
|
|
174
174
|
} else {
|
|
175
|
-
sourceProvenance = source;
|
|
175
|
+
sourceProvenance = url.isHttpUrl(source) || url.getProtocol(source) === 'file' || url.isURI(`file://${source}`) ? source : '[inline CONTENT]';
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
// next we assume that source is either file system URI or HTTP(S) URL
|