opds-community / drafts

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

Only allow OPDS Publications in OPDS 2 Feeds #39

Open llemeurfr opened 3 years ago

llemeurfr commented 3 years ago

In https://drafts.opds.io/opds-2.0#12-publications it is written that the publications json array can contain either OPDS Publications or Readium Web Publication Manifests (RWPM).

Note: The main difference between both structures is the presence of a readingOrder in the latter.

I can understand that presenting a feed of RWPM can in some circumstances appear useful to avoid making an additional fetch to retrieve resources of a specific web publication. But ...

Doing so is cumbersome for reading apps which must take into account two different cases (RWPM included or RWPM fetched from an acquisition link in an OPDS Publication), which is not KISS compliant. Plus the fact that it is not easily possible to disambiguate between a RWPM and an OPDS Publication (both having almost the same structure).

More, it tightly ties the ODPS 2 spec to the RWPM spec, which is not good. Add the possibility to embed RWPM in OPDS 2 makes it non-interoperable with OPDS 1.

The proposal is therefore to remove from 1.2 Publications the possibility to find RWPMs in the publications structure, and move the requirement to have an images collection to 4.1 OPDS Publication, where it logically belongs.

danielweck commented 3 years ago

Note that the OPDS "publication" schema only imports the Readium "metadata" JSON Schema, and defines its own structure otherwise: https://github.com/opds-community/drafts/blob/b7055e1c57aac91c150b5f357e9139b8a34d7d72/schema/publication.schema.json#L7-L9

danielweck commented 3 years ago

Besides the common "metadata" object definition, here are the OPDS vs. RWPM JSON Schemas to compare:

https://github.com/opds-community/drafts/blob/b7055e1c57aac91c150b5f357e9139b8a34d7d72/schema/publication.schema.json#L10-L81

https://github.com/readium/webpub-manifest/blob/664355b26d715805a5f54477da375ec00f84093f/schema/publication.schema.json#L17-L105