opds-community / drafts

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

JSON Schema - link missing bitrate, because out-of-date duplicate of Readium webpub manifest schema #20

Closed danielweck closed 5 years ago

danielweck commented 5 years ago

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

OPDS2 link (only difference: properties object ... and of course missing bitrate): https://github.com/opds-community/drafts/blob/4d82fb9a64f35a174a5f205c23ba623ec010d5ec/schema/link.schema.json

So, would it be possible for @OPDS/link.schema.json to "extend" @RWPM/link.schema.json in order to automatically inherit the common JSON dictionary fields, and then add the domain-specific properties object? This would avoid "out of sync" problems, and would make the JSON Schema more readable / maintainable.

Related issue: https://github.com/readium/webpub-manifest/issues/16

danielweck commented 5 years ago

Note that the TypeScript implementation currently uses the "extend" method, so OPDS links are allowed to carry the bitrate attribute, but of course the current JSON Schema would report a validation error.

danielweck commented 5 years ago

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

danielweck commented 5 years ago

Similar issue: https://github.com/opds-community/drafts/issues/25

HadrienGardeur commented 5 years ago

This was changed in a recent commit: https://github.com/opds-community/drafts/commit/87d530e05f001a5030ae3a1936bf6b9249d79773