@jentic/arazzo-resolver 1.0.0-alpha.21 → 1.0.0-alpha.23
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 +12 -0
- package/README.md +6 -9
- package/dist/jentic-arazzo-resolver.browser.js +14934 -17749
- package/dist/jentic-arazzo-resolver.browser.min.js +1 -1
- package/package.json +14 -11
- package/src/dereference/arazzo.cjs +0 -265
- package/src/dereference/arazzo.mjs +0 -257
- package/src/dereference/openapi.cjs +0 -252
- package/src/dereference/openapi.mjs +0 -244
- package/src/errors/DereferenceError.cjs +0 -15
- package/src/errors/DereferenceError.mjs +0 -12
- package/src/index.cjs +0 -15
- package/src/index.mjs +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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
|
+
# [1.0.0-alpha.23](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2026-03-11)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **resolver:** reuse configuration from parser ([#130](https://github.com/jentic/jentic-arazzo-tools/issues/130)) ([e135be7](https://github.com/jentic/jentic-arazzo-tools/commit/e135be78133ad3957a31716dabd540333d57c0a4))
|
|
11
|
+
|
|
12
|
+
# [1.0.0-alpha.22](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2026-03-10)
|
|
13
|
+
|
|
14
|
+
### Performance Improvements
|
|
15
|
+
|
|
16
|
+
- address memory issues with SpecLynx data model ([#124](https://github.com/jentic/jentic-arazzo-tools/issues/124)) ([90ee10d](https://github.com/jentic/jentic-arazzo-tools/commit/90ee10d52dbe7314d7dc2e48e0e656fd74a97cff))
|
|
17
|
+
|
|
6
18
|
# [1.0.0-alpha.21](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2026-02-24)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -359,14 +359,13 @@ Both `dereferenceArazzo` and `dereferenceOpenAPI` functions automatically set `r
|
|
|
359
359
|
|
|
360
360
|
```js
|
|
361
361
|
import { dereferenceArazzo, dereferenceOpenAPI } from '@jentic/arazzo-resolver';
|
|
362
|
-
import { toValue } from '@speclynx/apidom-core';
|
|
363
362
|
|
|
364
363
|
const arazzoResult = await dereferenceArazzo('https://example.com/arazzo.yaml');
|
|
365
|
-
const arazzoUri =
|
|
364
|
+
const arazzoUri = arazzoResult.meta.get('retrievalURI');
|
|
366
365
|
// 'https://example.com/arazzo.yaml'
|
|
367
366
|
|
|
368
367
|
const openapiResult = await dereferenceOpenAPI('https://example.com/openapi.yaml');
|
|
369
|
-
const openapiUri =
|
|
368
|
+
const openapiUri = openapiResult.meta.get('retrievalURI');
|
|
370
369
|
// 'https://example.com/openapi.yaml'
|
|
371
370
|
```
|
|
372
371
|
|
|
@@ -379,7 +378,6 @@ Each source description is a `ParseResultElement` with `'source-description'` cl
|
|
|
379
378
|
|
|
380
379
|
```js
|
|
381
380
|
import { dereferenceArazzo } from '@jentic/arazzo-resolver';
|
|
382
|
-
import { toValue } from '@speclynx/apidom-core';
|
|
383
381
|
|
|
384
382
|
const result = await dereferenceArazzo('/path/to/arazzo.json', {
|
|
385
383
|
dereference: { strategyOpts: { sourceDescriptions: true } },
|
|
@@ -394,9 +392,9 @@ for (let i = 1; i < result.length; i++) {
|
|
|
394
392
|
|
|
395
393
|
// Check if it's a source description
|
|
396
394
|
if (sdParseResult.classes.includes('source-description')) {
|
|
397
|
-
const name =
|
|
398
|
-
const type =
|
|
399
|
-
const retrievalURI =
|
|
395
|
+
const name = sdParseResult.meta.get('name');
|
|
396
|
+
const type = sdParseResult.meta.get('type'); // 'openapi' or 'arazzo'
|
|
397
|
+
const retrievalURI = sdParseResult.meta.get('retrievalURI');
|
|
400
398
|
|
|
401
399
|
// Access the dereferenced API element
|
|
402
400
|
const api = sdParseResult.api; // OpenApi3_1Element, SwaggerElement, ArazzoSpecification1Element, etc.
|
|
@@ -412,7 +410,6 @@ When source descriptions are dereferenced, a `ParseResultElement` is attached to
|
|
|
412
410
|
|
|
413
411
|
```js
|
|
414
412
|
import { dereferenceArazzo } from '@jentic/arazzo-resolver';
|
|
415
|
-
import { toValue } from '@speclynx/apidom-core';
|
|
416
413
|
|
|
417
414
|
const result = await dereferenceArazzo('/path/to/arazzo.json', {
|
|
418
415
|
dereference: { strategyOpts: { sourceDescriptions: true } },
|
|
@@ -431,7 +428,7 @@ if (sdParseResult.errors.length === 0) {
|
|
|
431
428
|
console.log(`API type: ${api.element}`); // e.g., 'openApi3_1'
|
|
432
429
|
|
|
433
430
|
// Get the retrieval URI
|
|
434
|
-
const retrievalURI =
|
|
431
|
+
const retrievalURI = sdParseResult.meta.get('retrievalURI');
|
|
435
432
|
console.log(`Loaded from: ${retrievalURI}`);
|
|
436
433
|
}
|
|
437
434
|
```
|