Skip to content

feat: Add simple filters for globals, collections and internal collections - #75

Merged
janbuchar merged 7 commits into
janbuchar:masterfrom
Xmaster6y:filters
Feb 18, 2026
Merged

feat: Add simple filters for globals, collections and internal collections#75
janbuchar merged 7 commits into
janbuchar:masterfrom
Xmaster6y:filters

Conversation

@Xmaster6y

Copy link
Copy Markdown
Contributor

cf #38

@Xmaster6y Xmaster6y changed the title Simple filters for globals, collections and internal collections feat: Simple filters for globals, collections and internal collections Jan 16, 2026
@Xmaster6y Xmaster6y changed the title feat: Simple filters for globals, collections and internal collections feat: Add simple filters for globals, collections and internal collections Jan 16, 2026

@janbuchar janbuchar left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution, could you please update the README to mention the feature, too?

Comment thread src/types.ts

@janbuchar janbuchar left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just two nitpicks. Then it's off to the races.

Comment thread src/openapi/generators.ts Outdated
),
components: {
securitySchemes: generateSecuritySchemes(options.authEndpoint),
securitySchemes: generateSecuritySchemes(options.authEndpoint ?? '/openapi-auth'),

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also looks kinda random - is it needed? (Same pattern appears twice in this file)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not thanks

Comment thread src/utils/filters.ts Outdated
return false
}

if (options.includeCollections !== undefined) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit - you could return true early if the option is undefined, which is slightly more readable IMO

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't get that sorry

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha thanks

Comment thread src/utils/filters.ts Outdated
Comment thread src/utils/filters.ts Outdated
Xmaster6y and others added 2 commits February 18, 2026 11:40
Co-authored-by: Jan Buchar <Teyras@gmail.com>
Co-authored-by: Jan Buchar <Teyras@gmail.com>
@janbuchar
janbuchar self-requested a review February 18, 2026 11:28
@janbuchar

Copy link
Copy Markdown
Owner

LGTM, thank you!

@janbuchar
janbuchar merged commit 48a3edb into janbuchar:master Feb 18, 2026
3 checks passed
@Xmaster6y
Xmaster6y deleted the filters branch February 18, 2026 12:20
GeKorm added a commit to GeKorm/payload-oapi that referenced this pull request Mar 10, 2026
…tions (janbuchar#75)

* initial filter

* format

* SanitizedPluginOptions

* readme update

* better typing

* Update src/utils/filters.ts

Co-authored-by: Jan Buchar <Teyras@gmail.com>

* Update src/utils/filters.ts

Co-authored-by: Jan Buchar <Teyras@gmail.com>

---------

Co-authored-by: Jan Buchar <Teyras@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants