Remove author from addon xsd (#3362)

* Remove author from addon xsd

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer
2023-02-11 19:50:05 +01:00
committed by GitHub
parent c30e4b8eea
commit 304617c5b7
9 changed files with 4 additions and 135 deletions
@@ -39,7 +39,6 @@ import org.openhab.core.test.java.JavaOSGiTest;
public class AddonInfoTest extends JavaOSGiTest {
private static final String TEST_BUNDLE_NAME = "BundleInfoTest.bundle";
private static final String TEST_BUNDLE_NAME2 = "BundleInfoTestNoAuthor.bundle";
private @NonNullByDefault({}) AddonInfoRegistry addonInfoRegistry;
private @NonNullByDefault({}) ConfigDescriptionRegistry configDescriptionRegistry;
@@ -65,22 +64,6 @@ public class AddonInfoTest extends JavaOSGiTest {
assertThat(addonInfo.getDescription(),
is("The hue Binding integrates the Philips hue system. It allows to control hue lights."));
assertThat(addonInfo.getName(), is("hue Binding"));
assertThat(addonInfo.getAuthor(), is("Deutsche Telekom AG"));
});
}
@Test
public void assertThatAddonInfoWithoutAuthorIsReadProperly() throws Exception {
addonInstaller.exec(TEST_BUNDLE_NAME2, () -> {
Set<AddonInfo> addonInfos = addonInfoRegistry.getAddonInfos();
AddonInfo addonInfo = addonInfos.iterator().next();
assertThat(addonInfo.getId(), is("hue"));
assertThat(addonInfo.getUID(), is("binding-hue"));
assertThat(addonInfo.getConfigDescriptionURI(), is("foo:bar"));
assertThat(addonInfo.getDescription(),
is("The hue Binding integrates the Philips hue system. It allows to control hue lights."));
assertThat(addonInfo.getName(), is("hue Binding"));
assertThat(addonInfo.getAuthor(), is((String) null));
});
}
@@ -7,7 +7,6 @@
<name>hue Binding</name>
<description>The hue Binding integrates the Philips hue system. It
allows to control hue lights.</description>
<author>Deutsche Telekom AG</author>
<!-- Dummy config -->
<config-description>
@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon:addon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd" id="hue">
<type>binding</type>
<name>hue Binding</name>
<description>The hue Binding integrates the Philips hue system. It
allows to control hue lights.</description>
<!-- Dummy config -->
<config-description uri="foo:bar">
<parameter name="list" type="text" multiple="true" min="2" max="3">
<options>
<option value="key1">label1</option>
<option value="key2">label2</option>
</options>
</parameter>
<parameter name="color-alarming-light" type="text" multiple="true">
<context>item</context>
<filter>
<criteria name="tags">alarm, light</criteria>
<criteria name="type">color</criteria>
<criteria name="binding-id">hue</criteria>
</filter>
</parameter>
</config-description>
</addon:addon>
@@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="hue" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- HUE Bridge -->
<bridge-type id="bridge">
<label>HUE Bridge</label>
<description>The hue Bridge represents the Philips hue bridge.</description>
<config-description>
<parameter name="ip" type="text">
<context>network-address</context>
<label>Network Address</label>
<description>Network address of the hue bridge.</description>
<required>true</required>
</parameter>
<parameter name="username" type="text">
<context>password</context>
<label>Username</label>
<description>Name of a registered hue bridge user, that allows to access the API.</description>
</parameter>
</config-description>
</bridge-type>
<!-- HUE Lamp -->
<thing-type id="lamp">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge"/>
</supported-bridge-type-refs>
<label>HUE Lamp</label>
<description>My own great HUE Lamp.</description>
<channels>
<channel id="color" typeId="color"/>
<channel id="color_temperature" typeId="color_temperature"/>
</channels>
</thing-type>
<!-- HUE Lamp Color Channel -->
<channel-type id="color">
<item-type>ColorItem</item-type>
<label>HUE Lamp Color</label>
<description>The color channel allows to control the color of the hue lamp. It is also possible to dim values and
switch the lamp on and off.</description>
<config-description>
<parameter name="lastDimValue" type="boolean"/>
</config-description>
</channel-type>
<!-- HUE Lamp Color Temperature Channel -->
<channel-type id="color_temperature">
<item-type>DimmerItem</item-type>
<label>HUE Lamp Color Temperature</label>
<description>The color temperature channel allows to set the color temperature from 0 (cold) to 100 (warm).</description>
</channel-type>
</thing:thing-descriptions>