@speclynx/apidom-reference 6.1.2 → 6.2.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 +14 -0
- package/README.md +12 -0
- package/dist/apidom-reference.browser.js +1073 -254
- package/dist/apidom-reference.browser.min.js +1 -1
- package/package.json +30 -30
- package/src/bundle/index.cjs +6 -4
- package/src/bundle/index.mjs +6 -4
- package/src/dereference/index.cjs +8 -5
- package/src/dereference/index.mjs +8 -5
- package/src/options/index.cjs +4 -0
- package/src/options/index.mjs +4 -0
- package/src/options/util.cjs +7 -1
- package/src/options/util.mjs +8 -2
- package/src/resolve/index.cjs +6 -3
- package/src/resolve/index.mjs +6 -3
- package/src/util/url.cjs +38 -8
- package/src/util/url.mjs +35 -6
- package/types/apidom-reference.d.ts +13 -0
- package/types/util/url.d.ts +11 -0
- package/LICENSES/AFL-3.0.txt +0 -182
- package/LICENSES/BSD-3-Clause.txt +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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
|
+
# [6.2.0](https://github.com/speclynx/apidom/compare/v6.1.2...v6.2.0) (2026-11-07)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **reference:** decode file system path characters only once ([41b8476](https://github.com/speclynx/apidom/commit/41b8476ca854b4eb0225e7b07736a416f7420e31)), closes [#733](https://github.com/speclynx/apidom/issues/733)
|
|
11
|
+
- **reference:** keep an encoded file:// page URL as default baseURI ([af3bfe0](https://github.com/speclynx/apidom/commit/af3bfe09690ad0c9289cf9bd3411bf3ebb4a9413)), closes [#733](https://github.com/speclynx/apidom/issues/733)
|
|
12
|
+
- **reference:** normalize root URI across entry points ([9c2475d](https://github.com/speclynx/apidom/commit/9c2475d2ad4da4ae3b2bdc54e353f754655463ef)), closes [#733](https://github.com/speclynx/apidom/issues/733)
|
|
13
|
+
- **reference:** round-trip '?' in file system paths ([bb4af5b](https://github.com/speclynx/apidom/commit/bb4af5b9a980ea97688ad6b919b3bb932dd55257)), closes [#733](https://github.com/speclynx/apidom/issues/733)
|
|
14
|
+
- **reference:** sanitize the path of file:// URLs in url.normalize ([8db965b](https://github.com/speclynx/apidom/commit/8db965baac0667eafd5ca2ab2bf695595c6c8831)), closes [#733](https://github.com/speclynx/apidom/issues/733)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- **reference:** add url.normalize util ([dcb7aea](https://github.com/speclynx/apidom/commit/dcb7aeaa6aa91b9c28fc52e769e7e6fd9848be36)), closes [#733](https://github.com/speclynx/apidom/issues/733)
|
|
19
|
+
|
|
6
20
|
## [6.1.2](https://github.com/speclynx/apidom/compare/v6.1.1...v6.1.2) (2026-10-29)
|
|
7
21
|
|
|
8
22
|
**Note:** Version bump only for package @speclynx/apidom-reference
|
package/README.md
CHANGED
|
@@ -1536,6 +1536,12 @@ await resolve('https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/
|
|
|
1536
1536
|
When externally resolving an ApiDOM fragment, [baseURI](https://github.com/speclynx/apidom/blob/91763fa4ad876375a413e7049c28c2031c7bbe83/apidom/packages/apidom-reference/src/options/index.ts#L47)
|
|
1537
1537
|
resolve option needs to be provided to have a starting point for external dependency resolution.
|
|
1538
1538
|
`mediaType` parse option is unnecessary as we can directly assert the type of ApiDOM fragment.
|
|
1539
|
+
A fragment in `baseURI` means the ApiDOM fragment is located at that fragment of the document,
|
|
1540
|
+
e.g. `/home/user/root.json#/components/parameters/userId`. When passing a whole document,
|
|
1541
|
+
give `baseURI` without a fragment.
|
|
1542
|
+
`baseURI` must be absolute: a file system path, a `file://` URL or an HTTP(S) URL. It defaults
|
|
1543
|
+
to the current working directory (the page URL in browsers). The same applies to the file passed
|
|
1544
|
+
to `resolve`, `dereference` or `bundle`; resolve a relative path first, e.g. with `path.resolve`.
|
|
1539
1545
|
|
|
1540
1546
|
```js
|
|
1541
1547
|
import { OpenApi3_1Element } from '@speclynx/apidom-ns-openapi-3-1';
|
|
@@ -1937,6 +1943,12 @@ await dereference('https://raw.githubusercontent.com/OAI/OpenAPI-Specification/m
|
|
|
1937
1943
|
When dereferencing an ApiDOM fragment, [baseURI](https://github.com/speclynx/apidom/blob/91763fa4ad876375a413e7049c28c2031c7bbe83/apidom/packages/apidom-reference/src/options/index.ts#L47)
|
|
1938
1944
|
resolve option needs to be provided to have a starting point for external dependency resolution.
|
|
1939
1945
|
`mediaType` parse option is unnecessary as we can directly assert the type of ApiDOM fragment.
|
|
1946
|
+
A fragment in `baseURI` means the ApiDOM fragment is located at that fragment of the document,
|
|
1947
|
+
e.g. `/home/user/root.json#/components/parameters/userId`. When passing a whole document,
|
|
1948
|
+
give `baseURI` without a fragment.
|
|
1949
|
+
`baseURI` must be absolute: a file system path, a `file://` URL or an HTTP(S) URL. It defaults
|
|
1950
|
+
to the current working directory (the page URL in browsers). The same applies to the file passed
|
|
1951
|
+
to `resolve`, `dereference` or `bundle`; resolve a relative path first, e.g. with `path.resolve`.
|
|
1940
1952
|
|
|
1941
1953
|
**ex.json**
|
|
1942
1954
|
|