Closed JakNowy closed 1 day ago
@igorbenav are you ok with this direction? Ultimately I would love to see plain endpoints the default behaviour, as well as read_paginated dropped and mixed into read_items. But those changes are breaking, so the question arises are you planning any major breaking release soon or should I just keep the changes minimalistic for now?
If we really use the simplified as the default, the changes are breaking in nature. I believe the best approach for the first version of this is:
endpoint_names
_read_paginated
and _read_items
will be unified whenever people create a router with _read_paginated
in itThen, after this, we may merge a fully breaking version without the warnings. Let's say 0.14.x has this warnings, 0.15.0 implements the breaking changes
@igorbenav feel free to review!
Other than the warning, I think it's just missing the pagination stuff and the deprecation warnings in the docs here and it's good to go
Nice one, @JakNowy, thanks!
Pull Request Template for FastCRUD
Description
This PR implements https://github.com/igorbenav/fastcrud/issues/67. It covers 2 issues:
It provides support for passing empty endpoint_names to fastcrud.crud_router() without redundant
//
in generated pathsIt mixes existing _read_paginated endpoint logic into _read_items. Now "page" and "items_per_page" query parameters can be passed to _read_paginated resulting in same behavour. I also confirmed that old-style request for _read_items persist it's functinality. Default:
works for both and new _read_items.
Appropriate warning have been added as needed.
I've added small update to advanced filters AND clauses documentation.
Tests
Describe the tests you added or modified to cover your changes, if applicable.
Checklist
Additional Notes
Include any additional information that you think is important for reviewers to know.