Filtering Collections and Globals - #38
Conversation
|
Hi @fabioquarantini and thanks for the contribution! Could you rebase this onto the current |
32ffe7f to
a6ffbc5
Compare
|
I've rebased the branch |
|
Is the pull request okay for you? |
|
Hi @fabioquarantini, I still haven't found the time to look into it - sorry for that. The huge change in the test snapshot kinda threw me off balance 🙂 Perhaps if you could sum up the changes in that and why it needed to happen, it would speed up the review process for me. |
|
Explaining it here isn’t easy. If you need any clarification, feel free to ask. |
janbuchar
left a comment
There was a problem hiding this comment.
Not gonna lie, it is really hard to read this as a whole. I highlighted some places where refactoring may help, let me know what you think.
There was a problem hiding this comment.
There are some unexpected changes in schema names etc. which make this hard to review. Any chance you could undo these?
| const mockCollections = { | ||
| posts: { | ||
| config: { slug: 'posts', auth: false }, | ||
| } as unknown as Collection, |
There was a problem hiding this comment.
Please write the config in a way that actually satisfies the Collection type instead of casting to unknown
There was a problem hiding this comment.
There is a lot of repetition that makes it hard to review this. Do you see any way to refactor this?
|
Thank you for the contribution @fabioquarantini. I will close this in favor of #75, which, while being less sophisticated, achieves a very similar result and is easier to review. Although we might want to port over the callback-based filtering over later on, that would be a nice addition. |
Filtering and Control Options
Collection and Global Filtering
Control which collections and globals are included in the OpenAPI specification:
Operation-Level Filtering
Control which CRUD operations are included for collections:
Field-Level Filtering
Control which fields are exposed in the documentation: