miLibris / flask-rest-jsonapi

Flask extension to build REST APIs around JSONAPI 1.0 specification.
http://flask-rest-jsonapi.readthedocs.io
MIT License
597 stars 153 forks source link

Default PAGE_SIZE not set in __init__ #64

Closed jcampbell closed 6 years ago

jcampbell commented 7 years ago

The recent change to using a default PAGE_SIZE from app.config causes a KEY_ERROR if the PAGE_SIZE config option is not set, as it is not by default when initializing an API object from an existing Flask app (as is done in most of the documentation).

The simplest fix seems to be to ensure the default page size is set in init in addition to init_app() of the Api class, although the tests and documentation seem split about the preferred way to construct the Api object.

hellupline commented 6 years ago

@akira-dev was this one closed on #74 ?

jcampbell commented 6 years ago

Yes, this should be closed.