Skip to content

Commit 6e4fed7

Browse files
committed
[doc] Schema to document the eXist-db REST API Exception document format
1 parent 5c8cd82 commit 6e4fed7

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Elemental
5+
Copyright (C) 2024, Evolved Binary Ltd
6+
7+
8+
https://www.evolvedbinary.com | https://www.elemental.xyz
9+
10+
This library is free software; you can redistribute it and/or
11+
modify it under the terms of the GNU Lesser General Public
12+
License as published by the Free Software Foundation; version 2.1.
13+
14+
This library is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17+
Lesser General Public License for more details.
18+
19+
You should have received a copy of the GNU Lesser General Public
20+
License along with this library; if not, write to the Free Software
21+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
-->
24+
<xs:schema
25+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
26+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
27+
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
28+
xmlns:dcterms="http://purl.org/dc/terms/"
29+
elementFormDefault="qualified"
30+
attributeFormDefault="unqualified"
31+
version="1.0.0">
32+
33+
<!--
34+
Schema for Elemental's eXist-db REST API Exceptions
35+
-->
36+
<xs:annotation>
37+
<xs:documentation>Schema for Exceptions raised by Elemental's eXist-db REST API</xs:documentation>
38+
<xs:appinfo>
39+
<dcterms:title>Schema for Exceptions raised by Elemental's eXist-db REST API</dcterms:title>
40+
<dcterms:created xsi:type="dcterms:W3CDTF">2025-10-26T14:59:17.419+02:00</dcterms:created>
41+
<dcterms:creator>Adam Retter</dcterms:creator>
42+
</xs:appinfo>
43+
</xs:annotation>
44+
45+
<xs:element name="exception">
46+
<xs:annotation>
47+
<xs:documentation>REST API Exception.</xs:documentation>
48+
</xs:annotation>
49+
<xs:complexType>
50+
<xs:sequence>
51+
<xs:element name="path" type="xs:string">
52+
<xs:annotation>
53+
<xs:documentation>The REST API path that raised the exception.</xs:documentation>
54+
</xs:annotation>
55+
</xs:element>
56+
<xs:element name="message" type="xs:string">
57+
<xs:annotation>
58+
<xs:documentation>The message of the exception.</xs:documentation>
59+
</xs:annotation>
60+
</xs:element>
61+
<xs:element name="query" type="xs:string" minOccurs="0">
62+
<xs:annotation>
63+
<xs:documentation>The XPath/XQuery that raised the exception.</xs:documentation>
64+
</xs:annotation>
65+
</xs:element>
66+
</xs:sequence>
67+
</xs:complexType>
68+
</xs:element>
69+
70+
</xs:schema>

schema/exist-rest-api.xsd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
version="1.0.0">
3535

3636
<xs:import schemaLocation="exist-serialized-types.xsd" namespace="http://exist-db.org/xquery/types/serialized"/>
37+
<xs:import schemaLocation="exist-rest-api-exception.xsd"/>
3738

3839

3940
<!--
@@ -49,6 +50,9 @@
4950
</xs:annotation>
5051

5152
<xs:element name="query">
53+
<xs:annotation>
54+
<xs:documentation>REST API XPath/XQuery.</xs:documentation>
55+
</xs:annotation>
5256
<xs:complexType>
5357
<xs:sequence>
5458
<xs:element name="properties" minOccurs="0">

0 commit comments

Comments
 (0)