@speclynx/apidom-parser 2.3.0 → 2.5.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/CHANGELOG.md +8 -0
- package/README.md +3 -3
- package/package.json +5 -5
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
|
+
# [2.5.0](https://github.com/speclynx/apidom/compare/v2.4.0...v2.5.0) (2026-01-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-parser
|
|
9
|
+
|
|
10
|
+
# [2.4.0](https://github.com/speclynx/apidom/compare/v2.3.0...v2.4.0) (2026-01-29)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @speclynx/apidom-parser
|
|
13
|
+
|
|
6
14
|
# [2.3.0](https://github.com/speclynx/apidom/compare/v2.2.3...v2.3.0) (2026-01-27)
|
|
7
15
|
|
|
8
16
|
### Features
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ const parser = new ApiDOMParser();
|
|
|
51
51
|
parser.use(jsonParserAdapter);
|
|
52
52
|
parser.use(yamlParserAdapter);
|
|
53
53
|
|
|
54
|
-
const namespace = await parser.findNamespace('{"prop"
|
|
54
|
+
const namespace = await parser.findNamespace('{"prop": "value"}', { mediaType: 'application/json' });
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
## Finding an appropriate media type
|
|
@@ -87,7 +87,7 @@ const parser = new ApiDOMParser();
|
|
|
87
87
|
parser.use(jsonParserAdapter);
|
|
88
88
|
parser.use(yamlParserAdapter);
|
|
89
89
|
|
|
90
|
-
const parseResult = await parser.parse('{"prop"
|
|
90
|
+
const parseResult = await parser.parse('{"prop": "value"}', { mediaType: 'application/json' });
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
`parse` method consumes various options as a second argument. Here is a list of options recognized by all parser adapters:
|
|
@@ -107,7 +107,7 @@ If no parser adapter was mounted before the parsing, calling `parse` method will
|
|
|
107
107
|
import ApiDOMParser from '@speclynx/apidom-parser';
|
|
108
108
|
|
|
109
109
|
const parser = new ApiDOMParser();
|
|
110
|
-
const parseResult = await parser.parse('{"prop"
|
|
110
|
+
const parseResult = await parser.parse('{"prop": "value"}', { mediaType: 'application/json' });
|
|
111
111
|
// => ParserError('Source did not match any registered parsers')
|
|
112
112
|
```
|
|
113
113
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speclynx/apidom-parser",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Parser consumes parser adapters and provides unified API for parsing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
42
|
-
"@speclynx/apidom-core": "^2.
|
|
43
|
-
"@speclynx/apidom-datamodel": "^2.
|
|
44
|
-
"@speclynx/apidom-error": "^2.
|
|
42
|
+
"@speclynx/apidom-core": "^2.5.0",
|
|
43
|
+
"@speclynx/apidom-datamodel": "^2.5.0",
|
|
44
|
+
"@speclynx/apidom-error": "^2.5.0",
|
|
45
45
|
"ramda": "~0.32.0",
|
|
46
46
|
"ramda-adjunct": "^6.0.0"
|
|
47
47
|
},
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"README.md",
|
|
56
56
|
"CHANGELOG.md"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "6473d0f9ea30c7fe89aae039e91a0859eaf3cd1c"
|
|
59
59
|
}
|