opds-community / drafts

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

OPDS 2 : currentPage should have a min value #74

Open llemeurfr opened 5 months ago

llemeurfr commented 5 months ago

currentPage of a feed is defined as "Indicates the current page number." and is an Integer.

Some developers start with 0, others with 1. It would be good to normalize the min value, my preference being 1.

HadrienGardeur commented 5 months ago

This could also be enforced in the JSON schema.

HadrienGardeur commented 5 months ago

I've just reviewed our JSON Schema and it uses an exclusive minimum of 0: https://github.com/opds-community/drafts/blob/master/schema/feed-metadata.schema.json#L42

This means that the minimum allowed value is actually 1. We could switch to minimum: 1 if it makes things clearer, is there any other change or addition that you would make @llemeurfr ?

llemeurfr commented 5 months ago

A clarification in the JSON schema is not sufficient. A mention in the specification is required to avoid mistakes.

Other properties may require the same level of precision in the specification, I didn't check the general case.