From 3cb58eca895a2d61cdced2b6ad8027d69f102786 Mon Sep 17 00:00:00 2001 From: Andrew Fiddian-Green Date: Sun, 4 Jan 2026 16:16:16 +0000 Subject: [PATCH] Describe XSD schema requirement and IDE validation tools (#2629) Also-by: Florian Hotze Signed-off-by: Andrew Fiddian-Green --- developers/guidelines.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/developers/guidelines.md b/developers/guidelines.md index 0a5808b58..925798816 100644 --- a/developers/guidelines.md +++ b/developers/guidelines.md @@ -93,6 +93,16 @@ The rules are defined using the Eclipse Java Formatter definitions. There are pl The rules are defined at for the Eclipse WTP formatter, but will have to be manually entered into your IDE. +#### XML files for Thing-Type Definitions + +Thing-Type definitions must comply with the [thing-description-1.0.0.xsd schema](https://www.openhab.org/schemas/thing-description-1.0.0.xsd). + +To enable automatic schema validation in your IDE you many need to do the following: + +- Eclipse: Download the latest copy of `thing-description-1.0.0.xsd` to your `.lemminx\cache\https\openhab.org\schemas` cache folder. +- IntelliJ: Put the cursor into the `xsi:schemeLocation` field of the XML, trigger the AltEnter shortcut and select _Fetch external resource_. +- Visual Studio Code: Install the XML extension from Red Hat. + ### Java Coding Style - The [Java naming conventions](https://java.about.com/od/javasyntax/a/nameconventions.htm) should always be used and are described in detail at the link, a quick summary is: