readium / webpub-manifest

📜 A JSON based Web Publication Manifest format used at the core of the Readium project
BSD 3-Clause "New" or "Revised" License
91 stars 23 forks source link

camelCase for all JSON property keys? What's `page-list` then? #53

Closed jccr closed 4 years ago

jccr commented 4 years ago

So it seems that the convention in the models are to have keys in camel case.

If this is the case.. there's an odd one out: page-list in the EPUB extension. https://readium.org/webpub-manifest/extensions/epub.html#:~:text=page-list

Should it become pageList?

@danielweck your JS shared models already use page-list IIRC. https://github.com/readium/r2-shared-js/blob/develop/src/models/publication.ts#L30

Any thoughts?

jccr commented 4 years ago

I propose we change it to camel case for consistency.

danielweck commented 4 years ago

no problems switching to pageList

llemeurfr commented 4 years ago

I agree, we edicted a rule back in January: Properties are written in camelCase Property values are low-case-hyphenated

danielweck commented 4 years ago

The JSON Schema needs updating: https://github.com/readium/webpub-manifest/blob/7edfa30e540b14fa3ab348462fe79f095a82ad69/schema/extensions/epub/subcollections.schema.json#L7