Skip to content

Commit

Permalink
Additional Information Source Enums (#59)
Browse files Browse the repository at this point in the history
* Add additional `informationSource` enums

- Kitsu
- MangaDex
- MangaUpdates

* Change `id` data types from int to string

Kitsu & Mangadex use id's that contain alphanumeric characters and hyphens, so we need to change the `id` data types to support these.
  • Loading branch information
bpepple authored Nov 17, 2024
1 parent 5f624ed commit 258f745
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
23 changes: 13 additions & 10 deletions drafts/v1.0/MetronInfo.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<xs:complexType name="idType">
<xs:simpleContent>
<xs:extension base="xs:positiveInteger">
<xs:extension base="xs:string">
<xs:attribute name="source" type="informationSource" use="required" />
<xs:attribute name="primary" type="xs:boolean" />
</xs:extension>
Expand All @@ -75,7 +75,7 @@
<xs:complexType name="resourceType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="id" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Expand All @@ -85,7 +85,7 @@
<xs:element name="Name" type="xs:string" />
<xs:element name="Imprint" type="resourceType" minOccurs="0" />
</xs:all>
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="id" type="xs:string" />
</xs:complexType>

<xs:complexType name="seriesType">
Expand All @@ -100,7 +100,7 @@
<xs:element name="AlternativeNames" type="alternativeNameType" minOccurs="0" />
</xs:all>
<xs:attribute name="lang" type="languageCode" default="en" />
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="id" type="xs:string" />
</xs:complexType>

<xs:complexType name="alternativeNameType">
Expand All @@ -113,7 +113,7 @@
<xs:complexType name="nameType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="id" type="xs:string" />
<xs:attribute name="lang" type="languageCode" default="en" />
</xs:extension>
</xs:simpleContent>
Expand Down Expand Up @@ -160,7 +160,7 @@
<xs:element name="Name" type="xs:string" />
<xs:element name="Designation" type="xs:string" minOccurs="0" />
</xs:all>
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="id" type="xs:string" />
</xs:complexType>

<xs:complexType name="arcsType">
Expand All @@ -174,7 +174,7 @@
<xs:element name="Name" type="xs:string" />
<xs:element name="Number" type="xs:positiveInteger" minOccurs="0" />
</xs:all>
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="id" type="xs:string" />
</xs:complexType>

<xs:complexType name="creditsType">
Expand All @@ -186,7 +186,7 @@
<xs:complexType name="roleType">
<xs:simpleContent>
<xs:extension base="roleValues">
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="id" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Expand All @@ -207,7 +207,7 @@
<xs:complexType name="genreType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="id" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Expand Down Expand Up @@ -259,6 +259,9 @@
<xs:enumeration value="AniList" />
<xs:enumeration value="Comic Vine" />
<xs:enumeration value="Grand Comics Database" />
<xs:enumeration value="Kitsu" /> <!-- ID's contain letters, hyphens, and numbers -->
<xs:enumeration value="MangaDex" /> <!-- ID's contain letters, hyphens, and numbers -->
<xs:enumeration value="MangaUpdates" />
<xs:enumeration value="Marvel" />
<xs:enumeration value="Metron" />
<xs:enumeration value="MyAnimeList" />
Expand Down Expand Up @@ -341,4 +344,4 @@
<xs:pattern value="[a-z][a-z]" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
</xs:schema>
1 change: 1 addition & 0 deletions drafts/v1.0/Sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<ID source="Metron" primary="true">290431</ID>
<ID source="Comic Vine">12345</ID>
<ID source="Grand Comics Database">543</ID>
<ID source="MangaDex">8b34f37a-0181-4f0b-8ce3-01217e9a602c</ID>
</IDS>
<Publisher id="12345">
<Name>DC Comics</Name>
Expand Down

0 comments on commit 258f745

Please sign in to comment.