|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 3 | + xmlns:addon="https://openhab.org/schemas/addon/v1.0.0" |
| 4 | + xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0" |
| 5 | + targetNamespace="https://openhab.org/schemas/addon/v1.0.0"> |
| 6 | + |
| 7 | + <xs:import namespace="https://openhab.org/schemas/config-description/v1.0.0" |
| 8 | + schemaLocation="https://openhab.org/schemas/config-description-1.0.0.xsd"/> |
| 9 | + |
| 10 | + <xs:element name="addon"> |
| 11 | + <xs:complexType> |
| 12 | + <xs:sequence> |
| 13 | + <xs:element name="type" type="addon:addonType"/> |
| 14 | + <xs:element name="name" type="xs:string"/> |
| 15 | + <xs:element name="description" type="xs:string"/> |
| 16 | + <xs:element name="connection" type="addon:connectionType" minOccurs="0"/> |
| 17 | + <xs:element name="countries" type="addon:countryType" minOccurs="0"> |
| 18 | + <xs:annotation> |
| 19 | + <xs:documentation>Comma-separated list of two-letter ISO country codes.</xs:documentation> |
| 20 | + </xs:annotation> |
| 21 | + </xs:element> |
| 22 | + <xs:element name="service-id" type="xs:string" minOccurs="0"> |
| 23 | + <xs:annotation> |
| 24 | + <xs:documentation>The ID (service.pid or component.name) of the main add-on service, which can be configured through OSGi configuration admin service. Should only be used in combination with a config description definition. The default value is <type>.<name></xs:documentation> |
| 25 | + </xs:annotation> |
| 26 | + </xs:element> |
| 27 | + <xs:choice minOccurs="0"> |
| 28 | + <xs:element name="config-description" type="config-description:configDescription"/> |
| 29 | + <xs:element name="config-description-ref" type="config-description:configDescriptionRef"/> |
| 30 | + </xs:choice> |
| 31 | + </xs:sequence> |
| 32 | + <xs:attribute name="id" type="config-description:idRestrictionPattern" use="required"> |
| 33 | + <xs:annotation> |
| 34 | + <xs:documentation>The id is used to construct the UID of this add-on to <type>-<name></xs:documentation> |
| 35 | + </xs:annotation> |
| 36 | + </xs:attribute> |
| 37 | + </xs:complexType> |
| 38 | + </xs:element> |
| 39 | + |
| 40 | + <xs:simpleType name="addonType"> |
| 41 | + <xs:restriction base="xs:string"> |
| 42 | + <xs:enumeration value="automation"/> |
| 43 | + <xs:enumeration value="binding"/> |
| 44 | + <xs:enumeration value="misc"/> |
| 45 | + <xs:enumeration value="persistence"/> |
| 46 | + <xs:enumeration value="transformation"/> |
| 47 | + <xs:enumeration value="ui"/> |
| 48 | + <xs:enumeration value="voice"/> |
| 49 | + </xs:restriction> |
| 50 | + </xs:simpleType> |
| 51 | + |
| 52 | + <xs:simpleType name="connectionType"> |
| 53 | + <xs:restriction base="xs:string"> |
| 54 | + <xs:enumeration value="none"> |
| 55 | + <xs:annotation> |
| 56 | + <xs:documentation>No interaction with external systems at all</xs:documentation> |
| 57 | + </xs:annotation> |
| 58 | + </xs:enumeration> |
| 59 | + <xs:enumeration value="local"> |
| 60 | + <xs:annotation> |
| 61 | + <xs:documentation>Interaction with external systems, without internet access</xs:documentation> |
| 62 | + </xs:annotation> |
| 63 | + </xs:enumeration> |
| 64 | + <xs:enumeration value="hybrid"> |
| 65 | + <xs:annotation> |
| 66 | + <xs:documentation>Interaction with external systems, internet access required only for extended functionality (such as discovery)</xs:documentation> |
| 67 | + </xs:annotation> |
| 68 | + </xs:enumeration> |
| 69 | + <xs:enumeration value="cloud"> |
| 70 | + <xs:annotation> |
| 71 | + <xs:documentation>Interaction with external systems, internet access required for normal operation</xs:documentation> |
| 72 | + </xs:annotation> |
| 73 | + </xs:enumeration> |
| 74 | + </xs:restriction> |
| 75 | + </xs:simpleType> |
| 76 | + |
| 77 | + <xs:simpleType name="countryType"> |
| 78 | + <xs:restriction base="xs:string"> |
| 79 | + <xs:pattern value="[a-z]{2}(,[a-z]{2})*"/> |
| 80 | + </xs:restriction> |
| 81 | + </xs:simpleType> |
| 82 | + |
| 83 | +</xs:schema> |
0 commit comments