Improve thing description XSD (#4217)

* Improve thing description XSD

Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
J-N-K 2024-05-17 23:17:13 +02:00 committed by GitHub
parent 593681a681
commit 88c5a0849f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,8 @@
<xs:complexType name="thingType">
<xs:sequence>
<xs:element name="supported-bridge-type-refs" type="thing-description:supportedBridgeTypeRefs" minOccurs="0"/>
<xs:element name="supported-bridge-type-refs" type="thing-description:supportedBridgeTypeRefs"
minOccurs="0"/>
<xs:element name="label" type="xs:string"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="category" type="xs:string" minOccurs="0"/>
@ -95,7 +96,8 @@
<xs:complexType name="supportedBridgeTypeRefs">
<xs:sequence>
<xs:element name="bridge-type-ref" type="thing-description:bridgeTypeRef" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="bridge-type-ref" type="thing-description:bridgeTypeRef" minOccurs="1"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
@ -141,10 +143,78 @@
<xs:attribute name="typeId" type="config-description:idRestrictionPattern" use="required"/>
</xs:complexType>
<xs:simpleType name="itemTypeName">
<xs:restriction base="xs:string">
<xs:enumeration value="Call"/>
<xs:enumeration value="Color"/>
<xs:enumeration value="Contact"/>
<xs:enumeration value="DateTime"/>
<xs:enumeration value="Dimmer"/>
<xs:enumeration value="Group"/>
<xs:enumeration value="Image"/>
<xs:enumeration value="Location"/>
<xs:enumeration value="Number"/>
<xs:enumeration value="Number:Intensity"/>
<xs:enumeration value="Number:Acceleration"/>
<xs:enumeration value="Number:AmountOfSubstance"/>
<xs:enumeration value="Number:Angle"/>
<xs:enumeration value="Number:AngularAcceleration"/>
<xs:enumeration value="Number:AngularVelocity"/>
<xs:enumeration value="Number:Area"/>
<xs:enumeration value="Number:CatalyticActivity"/>
<xs:enumeration value="Number:Currency"/>
<xs:enumeration value="Number:DataAmount"/>
<xs:enumeration value="Number:DataRate"/>
<xs:enumeration value="Number:Dimensionless"/>
<xs:enumeration value="Number:Duration"/>
<xs:enumeration value="Number:DynamicViscosity"/>
<xs:enumeration value="Number:ElectricCapacitance"/>
<xs:enumeration value="Number:ElectricCharge"/>
<xs:enumeration value="Number:ElectricConductance"/>
<xs:enumeration value="Number:ElectricCurrent"/>
<xs:enumeration value="Number:ElectricInductance"/>
<xs:enumeration value="Number:ElectricPotential"/>
<xs:enumeration value="Number:ElectricResistance"/>
<xs:enumeration value="Number:EmissionIntensity"/>
<xs:enumeration value="Number:Energy"/>
<xs:enumeration value="Number:EnergyPrice"/>
<xs:enumeration value="Number:Force"/>
<xs:enumeration value="Number:Frequency"/>
<xs:enumeration value="Number:Illuminance"/>
<xs:enumeration value="Number:KinematicViscosity"/>
<xs:enumeration value="Number:Length"/>
<xs:enumeration value="Number:LuminousFlux"/>
<xs:enumeration value="Number:LuminousIntensity"/>
<xs:enumeration value="Number:MagneticFlux"/>
<xs:enumeration value="Number:MagneticFluxDensity"/>
<xs:enumeration value="Number:Mass"/>
<xs:enumeration value="Number:MassFlowRate"/>
<xs:enumeration value="Number:Power"/>
<xs:enumeration value="Number:Pressure"/>
<xs:enumeration value="Number:RadiationDoseAbsorbed"/>
<xs:enumeration value="Number:RadiationDoseEffective"/>
<xs:enumeration value="Number:RadiationSpecificActivity"/>
<xs:enumeration value="Number:RadioactiveActivity"/>
<xs:enumeration value="Number:SolidAngle"/>
<xs:enumeration value="Number:Speed"/>
<xs:enumeration value="Number:Temperature"/>
<xs:enumeration value="Number:Torque"/>
<xs:enumeration value="Number:Velocity"/>
<xs:enumeration value="Number:Time"/>
<xs:enumeration value="Number:Volume"/>
<xs:enumeration value="Number:VolumetricDensity"/>
<xs:enumeration value="Number:VolumetricFlowRate"/>
<xs:enumeration value="Player"/>
<xs:enumeration value="Rollershutter"/>
<xs:enumeration value="String"/>
<xs:enumeration value="Switch"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="itemType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="unitHint" type="xs:string" use="optional" />
<xs:extension base="thing-description:itemTypeName">
<xs:attribute name="unitHint" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
@ -205,56 +275,4 @@
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="dimension">
<xs:restriction base="xs:string">
<xs:enumeration value="Intensity" />
<xs:enumeration value="Acceleration" />
<xs:enumeration value="AmountOfSubstance" />
<xs:enumeration value="Angle" />
<xs:enumeration value="AngularAcceleration" />
<xs:enumeration value="AngularVelocity" />
<xs:enumeration value="Area" />
<xs:enumeration value="CatalyticActivity" />
<xs:enumeration value="DataAmount" />
<xs:enumeration value="DataRate" />
<xs:enumeration value="Dimensionless" />
<xs:enumeration value="Duration" />
<xs:enumeration value="DynamicViscosity" />
<xs:enumeration value="ElectricCapacitance" />
<xs:enumeration value="ElectricCharge" />
<xs:enumeration value="ElectricConductance" />
<xs:enumeration value="ElectricCurrent" />
<xs:enumeration value="ElectricInductance" />
<xs:enumeration value="ElectricPotential" />
<xs:enumeration value="ElectricResistance" />
<xs:enumeration value="Energy" />
<xs:enumeration value="Force" />
<xs:enumeration value="Frequency" />
<xs:enumeration value="Illuminance" />
<xs:enumeration value="KinematicViscosity" />
<xs:enumeration value="Length" />
<xs:enumeration value="LuminousFlux" />
<xs:enumeration value="LuminousIntensity" />
<xs:enumeration value="MagneticFlux" />
<xs:enumeration value="MagneticFluxDensity" />
<xs:enumeration value="Mass" />
<xs:enumeration value="MassFlowRate" />
<xs:enumeration value="Power" />
<xs:enumeration value="Pressure" />
<xs:enumeration value="RadiationDoseAbsorbed" />
<xs:enumeration value="RadiationDoseEffective" />
<xs:enumeration value="RadioactiveActivity" />
<xs:enumeration value="SolidAngle" />
<xs:enumeration value="Speed" />
<xs:enumeration value="Temperature" />
<xs:enumeration value="Torque" />
<xs:enumeration value="Velocity" />
<xs:enumeration value="Time" />
<xs:enumeration value="Volume" />
<xs:enumeration value="VolumetricDensity" />
<xs:enumeration value="VolumetricFlowRate" />
</xs:restriction>
</xs:simpleType>
</xs:schema>