This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
claims.xsd
80 lines (78 loc) · 3.35 KB
/
claims.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016-2023 Zerocracy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to read
the Software only. Permissions is hereby NOT GRANTED to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="SNAPSHOT" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="http://datum.zerocracy.com/SNAPSHOT/xsd/basics.xsd"/>
<xs:include schemaLocation="http://datum.zerocracy.com/SNAPSHOT/xsd/pmo/types.xsd"/>
<xs:complexType name="param">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="claim">
<xs:all>
<xs:element name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z ]+"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="created" type="xs:dateTime"/>
<xs:element name="until" minOccurs="0" type="xs:dateTime"/>
<xs:element name="author" minOccurs="0" type="login"/>
<xs:element name="unique" minOccurs="0" type="xs:string"/>
<xs:element name="priority" minOccurs="0" type="xs:string"/>
<xs:element name="token" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="(telegram|github|slack|user|job|test|project);.+"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="params" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="param" type="param" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
<!--
@todo #388:30min Restrict id type as uuid.
Claim id was changed from long to uuid, but to keep
system working the migration should be done in two steps:
change claim id from long to string to accept both types
(numbers and uuids), then change this type to uuid (see types.xsd).
-->
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:element name="claims">
<xs:complexType>
<xs:sequence>
<xs:element name="claim" type="claim" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="updated" use="required" type="xs:dateTime"/>
<xs:attribute name="version" use="required" type="version"/>
<xs:attribute name="busy" use="optional" type="xs:dateTime"/>
</xs:complexType>
<xs:unique name="claimID">
<xs:selector xpath="claim"/>
<xs:field xpath="@id"/>
</xs:unique>
</xs:element>
</xs:schema>