@speclynx/apidom-parser-adapter-openapi-json-2 2.10.3 → 2.11.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 CHANGED
@@ -3,6 +3,10 @@
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.11.0](https://github.com/speclynx/apidom/compare/v2.10.3...v2.11.0) (2026-02-12)
7
+
8
+ **Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-json-2
9
+
6
10
  ## [2.10.3](https://github.com/speclynx/apidom/compare/v2.10.2...v2.10.3) (2026-02-10)
7
11
 
8
12
  **Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-json-2
@@ -22263,7 +22263,13 @@ class Element {
22263
22263
 
22264
22264
  /** Unique identifier for this element. */
22265
22265
  get id() {
22266
- return this.getMetaProperty('id', '');
22266
+ if (this.isFrozen) {
22267
+ return this.getMetaProperty('id', '');
22268
+ }
22269
+ if (!this.hasMetaProperty('id')) {
22270
+ this.setMetaProperty('id', '');
22271
+ }
22272
+ return this.meta.get('id');
22267
22273
  }
22268
22274
  set id(value) {
22269
22275
  this.setMetaProperty('id', value);
@@ -22271,7 +22277,13 @@ class Element {
22271
22277
 
22272
22278
  /** CSS-like class names. */
22273
22279
  get classes() {
22274
- return this.getMetaProperty('classes', []);
22280
+ if (this.isFrozen) {
22281
+ return this.getMetaProperty('classes', []);
22282
+ }
22283
+ if (!this.hasMetaProperty('classes')) {
22284
+ this.setMetaProperty('classes', []);
22285
+ }
22286
+ return this.meta.get('classes');
22275
22287
  }
22276
22288
  set classes(value) {
22277
22289
  this.setMetaProperty('classes', value);
@@ -22279,7 +22291,13 @@ class Element {
22279
22291
 
22280
22292
  /** Hyperlinks associated with this element. */
22281
22293
  get links() {
22282
- return this.getMetaProperty('links', []);
22294
+ if (this.isFrozen) {
22295
+ return this.getMetaProperty('links', []);
22296
+ }
22297
+ if (!this.hasMetaProperty('links')) {
22298
+ this.setMetaProperty('links', []);
22299
+ }
22300
+ return this.meta.get('links');
22283
22301
  }
22284
22302
  set links(value) {
22285
22303
  this.setMetaProperty('links', value);
@@ -22430,16 +22448,26 @@ class Element {
22430
22448
  }
22431
22449
 
22432
22450
  /**
22433
- * Gets a meta property, creating it with default value if not present.
22451
+ * Gets a meta property.
22452
+ *
22453
+ * When the property doesn't exist:
22454
+ * - With defaultValue: returns a new refracted element instance (not cached)
22455
+ * - Without defaultValue: returns undefined
22456
+ *
22457
+ * Note: Each call with a default creates a new instance. Use setMetaProperty
22458
+ * first if you need reference equality across multiple accesses.
22434
22459
  */
22460
+
22435
22461
  getMetaProperty(name, defaultValue) {
22436
- if (!this.meta.hasKey(name)) {
22437
- if (this.isFrozen) {
22438
- const element = this.refract(defaultValue);
22462
+ if (!this.hasMetaProperty(name)) {
22463
+ if (defaultValue === undefined) {
22464
+ return undefined;
22465
+ }
22466
+ const element = this.refract(defaultValue);
22467
+ if (element && this.isFrozen) {
22439
22468
  element.freeze();
22440
- return element;
22441
22469
  }
22442
- this.meta.set(name, defaultValue);
22470
+ return element;
22443
22471
  }
22444
22472
  return this.meta.get(name);
22445
22473
  }