-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: overhaul and add readthedocs support.
Resolves #33.
- Loading branch information
Showing
11 changed files
with
153 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
formats: all | ||
python: | ||
version: 3.9 | ||
install: | ||
- requirements: docs/requirements.txt | ||
sphinx: | ||
builder: html | ||
configuration: docs/conf.py | ||
fail_on_warning: true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ Contents: | |
|
||
tutorial | ||
middlewares | ||
limitations | ||
specifications | ||
|
||
Indices and tables | ||
================== | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
Limitations | ||
=========== | ||
|
||
``xsd.Ref()`` is not serialized | ||
------------------------------- | ||
|
||
XML schema references are not serialized. Below is an example of code that does not generate a valid schema: | ||
|
||
.. code-block:: python | ||
from lxml import etree | ||
from soapfish import py2xsd, xsd | ||
class Person(xsd.Group): | ||
name = xsd.Element(xsd.String) | ||
surname = xsd.Element(xsd.String) | ||
class Job(xsd.ComplexType): | ||
title = xsd.Element(xsd.String) | ||
person = xsd.Ref(Person) | ||
schema = xsd.Schema( | ||
imports=[], | ||
targetNamespace='http://example.com/ws/spec', | ||
elementFormDefault='qualified', | ||
simpleTypes=[], | ||
attributeGroups=[], | ||
groups=[], | ||
complexTypes=[], | ||
elements={'job': xsd.Element(Job())}, | ||
) | ||
print(etree.tostring(py2xsd.generate_xsd(schema), pretty_print=True)) | ||
Incorrect XML Schema: | ||
|
||
.. code-block:: xml | ||
<xsd:schema | ||
xmlns:sns="http://example.com/ws/spec" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
targetNamespace="http://example.com/ws/spec" | ||
elementFormDefault="qualified"> | ||
<xsd:element name="job"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="title" type="xsd:string" minOccurs="1" nillable="false"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:schema> | ||
Expected XML Schema: | ||
|
||
.. code-block:: xml | ||
<xsd:schema | ||
xmlns:site="http://example.com/ws/spec" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
targetNamespace="http://example.com/ws/spec" | ||
elementFormDefault="qualified"> | ||
<xsd:element name="person"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="name" type="xs:string"/> | ||
<xsd:element name="surname" type="xs:string"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
</xsd:element> | ||
<xsd:element name="job"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="title" type="xs:string" minOccurs="1" nillable="false"/> | ||
<xsd:element ref="site:person"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:schema> | ||
Valid XML for Expected Schema: | ||
|
||
.. code-block:: xml | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<job xmlns="http://example.com/ws/spec"> | ||
<title>Software Developer</title> | ||
<person> | ||
<name>Joe</name> | ||
<surname>Bloggs</surname> | ||
</person> | ||
</job> | ||
``XSDDate`` does not support full date range | ||
-------------------------------------------- | ||
|
||
The XML schema specification does not limit the range of dates representable by | ||
``xs:date``. For example, the values ``-2000-03-10`` and ``20000-04-20`` are | ||
valid as far ``xs:date`` is concerned. Currently ``soapfish.xsd_types.XSDDate`` | ||
is subclassing Python's standard library :py:class:`datetime.date` which has a | ||
much more narrow definition. | ||
|
||
Very likely the best solution will be to back our implementation with an | ||
alternative ``date`` implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sphinx | ||
sphinx-rtd-theme |
Oops, something went wrong.