apostrophe
apostrophe copied to clipboard
In 3.x the `perPage` option on piece types should be renamed `apiPerPage`
The problem to solve
Both piece types and piece page types have a perPage
option in 3.x. The module types are related and the properties have identical keys, but they have different purposes. We could make those more clear by renaming one.
Proposed solution
In piece page types, perPage
defines the number of pieces displayed on index pages of that type. For piece type modules, perPage
defines the number of pieces included in each "page" of API GET requests.
We should rename the option on piece type modules to apiPerPage
to make its functionality clearer. We could cover the BC break by letting perPage
serve as an undocumented alias.
Alternatives
We do nothing and count on documentation and the fact that it probably won't be used all that often for piece types anyway.
perPage
is used pretty heavily I would expect, since it has a default and it might not be what is wanted all the time.
apiPerPage
seems reasonable to me.