@speclynx/apidom-parser-adapter-openapi-json-3-0 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-3-0
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-3-0
@@ -22191,7 +22191,13 @@ class Element {
22191
22191
 
22192
22192
  /** Unique identifier for this element. */
22193
22193
  get id() {
22194
- return this.getMetaProperty('id', '');
22194
+ if (this.isFrozen) {
22195
+ return this.getMetaProperty('id', '');
22196
+ }
22197
+ if (!this.hasMetaProperty('id')) {
22198
+ this.setMetaProperty('id', '');
22199
+ }
22200
+ return this.meta.get('id');
22195
22201
  }
22196
22202
  set id(value) {
22197
22203
  this.setMetaProperty('id', value);
@@ -22199,7 +22205,13 @@ class Element {
22199
22205
 
22200
22206
  /** CSS-like class names. */
22201
22207
  get classes() {
22202
- return this.getMetaProperty('classes', []);
22208
+ if (this.isFrozen) {
22209
+ return this.getMetaProperty('classes', []);
22210
+ }
22211
+ if (!this.hasMetaProperty('classes')) {
22212
+ this.setMetaProperty('classes', []);
22213
+ }
22214
+ return this.meta.get('classes');
22203
22215
  }
22204
22216
  set classes(value) {
22205
22217
  this.setMetaProperty('classes', value);
@@ -22207,7 +22219,13 @@ class Element {
22207
22219
 
22208
22220
  /** Hyperlinks associated with this element. */
22209
22221
  get links() {
22210
- return this.getMetaProperty('links', []);
22222
+ if (this.isFrozen) {
22223
+ return this.getMetaProperty('links', []);
22224
+ }
22225
+ if (!this.hasMetaProperty('links')) {
22226
+ this.setMetaProperty('links', []);
22227
+ }
22228
+ return this.meta.get('links');
22211
22229
  }
22212
22230
  set links(value) {
22213
22231
  this.setMetaProperty('links', value);
@@ -22358,16 +22376,26 @@ class Element {
22358
22376
  }
22359
22377
 
22360
22378
  /**
22361
- * Gets a meta property, creating it with default value if not present.
22379
+ * Gets a meta property.
22380
+ *
22381
+ * When the property doesn't exist:
22382
+ * - With defaultValue: returns a new refracted element instance (not cached)
22383
+ * - Without defaultValue: returns undefined
22384
+ *
22385
+ * Note: Each call with a default creates a new instance. Use setMetaProperty
22386
+ * first if you need reference equality across multiple accesses.
22362
22387
  */
22388
+
22363
22389
  getMetaProperty(name, defaultValue) {
22364
- if (!this.meta.hasKey(name)) {
22365
- if (this.isFrozen) {
22366
- const element = this.refract(defaultValue);
22390
+ if (!this.hasMetaProperty(name)) {
22391
+ if (defaultValue === undefined) {
22392
+ return undefined;
22393
+ }
22394
+ const element = this.refract(defaultValue);
22395
+ if (element && this.isFrozen) {
22367
22396
  element.freeze();
22368
- return element;
22369
22397
  }
22370
- this.meta.set(name, defaultValue);
22398
+ return element;
22371
22399
  }
22372
22400
  return this.meta.get(name);
22373
22401
  }