Skip to content
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

Exclude Individual Entity Properties #106

Merged
merged 12 commits into from Aug 7, 2022

Conversation

LePips
Copy link
Contributor

@LePips LePips commented Aug 5, 2022

Adds basic property exclusions for entities. I really don't know why I overthought this as it's really simple. I provide a warning for when an excluded property in the config does not actually exist in the schema as it's technically incorrect against the schema, but won't break the generation. I don't provide any other warnings or errors for exclusion as that will be caught either at the compilation or the API level by the developer and they manually excluded objects in their config.

I don't provide a warning against renamings+excludes or redundant excludes, which would require validating the exclude list right after parsing and before any generation. I think these are up to the developer to keep clean or we can create a robust config validator to surface these warnings.

Copy link
Member

@liamnichols liamnichols left a comment

Choose a reason for hiding this comment

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

Great job! Yeah it did turn out pretty simple in the end 👍

Sources/CreateAPI/Generator/Generator+Schemas.swift Outdated Show resolved Hide resolved
Sources/CreateAPI/Generator/Generator+Schemas.swift Outdated Show resolved Hide resolved
@LePips LePips requested a review from liamnichols August 5, 2022 20:24
Sourcery/ConfigOptions.md.stencil Outdated Show resolved Hide resolved
Sources/CreateAPI/Generator/Generator+Schemas.swift Outdated Show resolved Hide resolved
Sources/CreateAPI/Generator/Generator+Schemas.swift Outdated Show resolved Hide resolved
Sources/CreateAPI/Generator/Generator+Schemas.swift Outdated Show resolved Hide resolved
LePips and others added 2 commits August 5, 2022 17:51
Co-authored-by: Liam Nichols <liam.nichols.ln@gmail.com>
@LePips LePips requested a review from liamnichols August 6, 2022 00:01
Copy link
Member

@liamnichols liamnichols left a comment

Choose a reason for hiding this comment

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

Another great contribution, thanks @LePips!

@liamnichols liamnichols merged commit cb540c8 into CreateAPI:main Aug 7, 2022
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.

Exclude for Individual Properties
2 participants