-
Notifications
You must be signed in to change notification settings - Fork 20
Filtering Collections and Globals #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of repetition that makes it hard to review this. Do you see any way to refactor this?
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: