Skip to content

Commit

Permalink
Merge pull request #13916 from adrianschroeter/service-def-schema
Browse files Browse the repository at this point in the history
[api] add service type defintion schema file
  • Loading branch information
Dany Marcoux committed Mar 1, 2023
2 parents 461b9e0 + ef834d0 commit 693c935
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions docs/api/api/service-definition.rng
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="http://buildservice.org/api"
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:a="http://www.example.com/annotation">

<start>
<ref name="service-def-element"/>
</start>

<define ns="" name="service-def-element">
<element name="service">
<attribute name="name">
<data type="string"/>
</attribute>
<element name="summary">
<a:documentation>
Summary of service purpose.
</a:documentation>
<text/>
</element>
<element name="description">
<a:documentation>
Longer description of service purpose.
</a:documentation>
<text/>
</element>
<zeroOrMore>
<ref name="parameter-element"/>
</zeroOrMore>
</element>
</define>

<define ns="" name="parameter-element">
<element name="parameter">
<attribute name="name">
<a:documentation>
Parameter name for the service executable. Can be any, except "outdir" which
exists always implicit.
</a:documentation>
<data type="string"/>
</attribute>
<element name="description">
<a:documentation>
Description for the (not anymore existing) webui service editor.
</a:documentation>
<text/>
</element>
<interleave>
<optional>
<element name="required">
<a:documentation>
Parameters are optional by default, this is a marker to make it required.
A hint for the UI.
</a:documentation>
<empty/>
</element>
</optional>
<optional>
<element name="allowmultiple">
<a:documentation>
This parameter can be used multiple times.
A hint for the UI.
</a:documentation>
<empty/>
</element>
</optional>
<zeroOrMore>
<element name="allowedvalue">
<a:documentation>
Allowed values for the parameter.
A hint for the UI to offer a selector.
</a:documentation>
<text/>
</element>
</zeroOrMore>
</interleave>
</element>
</define>
</grammar>

0 comments on commit 693c935

Please sign in to comment.