From e2ec5dedaf936dcb4906b6c222e5e2a4da53c6ea Mon Sep 17 00:00:00 2001 From: Cristiano Aguzzi Date: Thu, 13 May 2021 23:54:36 +0200 Subject: [PATCH] W3C compliance - Use forms instead of links in Properties, Actions, and Events (#100) --- schema | 2 +- src/property.ts | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/schema b/schema index 755cd29..7397a0b 160000 --- a/schema +++ b/schema @@ -1 +1 @@ -Subproject commit 755cd29fc992ad16b56300d581307c03c708238e +Subproject commit 7397a0bfcd13ec39ebddea1f8b4dc164dacd3835 diff --git a/src/property.ts b/src/property.ts index 2680691..dc6ced4 100644 --- a/src/property.ts +++ b/src/property.ts @@ -10,7 +10,7 @@ import { Device } from './device'; -import { Any, Link, Property as PropertySchema, PropertyValueType } from './schema'; +import { Any, PropertyForm, Property as PropertySchema, PropertyValueType } from './schema'; import assert from 'assert'; @@ -45,7 +45,7 @@ export class Property { private multipleOf?: number; - private links: Link[]; + private forms: PropertyForm[]; private fireAndForget = false; @@ -78,7 +78,7 @@ export class Property { this.enum = propertyDescr.enum; this.readOnly = propertyDescr.readOnly; this.multipleOf = propertyDescr.multipleOf; - this.links = propertyDescr.links ?? []; + this.forms = propertyDescr.forms ?? []; } /** @@ -99,7 +99,7 @@ export class Property { enum: this.enum, readOnly: this.readOnly, multipleOf: this.multipleOf, - links: this.links, + forms: this.forms, }; } @@ -119,7 +119,7 @@ export class Property { enum: this.enum, readOnly: this.readOnly, multipleOf: this.multipleOf, - links: this.links, + forms: this.forms, }; } @@ -321,11 +321,11 @@ export class Property { this.multipleOf = value; } - getLinks(): Link[] { - return this.links; + getForms(): PropertyForm[] { + return this.forms; } - setLinks(value: Link[]): void { - this.links = value; + setForms(value: PropertyForm[]): void { + this.forms = value; } }