opds-community / drafts

Contains all the current drafts for the OPDS specifications
36 stars 10 forks source link

JSON Schema - publication.metadata.contributor.link (ReadiumWebPubManifest), no validation for OPDS domain-specific properties (question: is that a problem?) #21

Closed danielweck closed 5 years ago

danielweck commented 5 years ago

I suspect that this is actually not a problem in the real-world (it is in fact a "feature", not a "bug"), because publication.metadata.contributor.links are never expected to carry the OPDS-specific properties (such as "price", "number of items", "indirectAcquisition", etc. which apply only at the level of OPDS feed and publication links). @HadrienGardeur am I right? (I am closing this issue immediately as I am pretty sure this is a correct assumption, I just wanted to double check)

Levels of indirection:

The OPDS publication schema: https://github.com/opds-community/drafts/blob/4d82fb9a64f35a174a5f205c23ba623ec010d5ec/schema/publication.schema.json#L7

...references the ReadiumWebPubManifest metadata schema: https://github.com/readium/webpub-manifest/blob/0ac78ab5c270a608c39b4b04fc90bd9b1d281896/schema/metadata.schema.json

...which in turn references the ReadiumWebPubManifest contributor schema: https://github.com/readium/webpub-manifest/blob/0ac78ab5c270a608c39b4b04fc90bd9b1d281896/schema/contributor-object.schema.json#L44

...which then references the ReadiumWebPubManifest link schema: https://github.com/readium/webpub-manifest/blob/ca6d887caa2d0495200fef4695f41aacb5fed2e9/schema/link.schema.json

...which lacks the domain-specific properties defined in the OPDS link schema: https://github.com/opds-community/drafts/blob/4d82fb9a64f35a174a5f205c23ba623ec010d5ec/schema/link.schema.json#L29 => https://github.com/opds-community/drafts/blob/4d82fb9a64f35a174a5f205c23ba623ec010d5ec/schema/properties.schema.json

danielweck commented 5 years ago

Related issues: https://github.com/opds-community/drafts/issues/20 https://github.com/opds-community/drafts/issues/22