-
-
Notifications
You must be signed in to change notification settings - Fork 843
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
feat: add possibility to ignore properties from schema #2416
base: master
Are you sure you want to change the base?
feat: add possibility to ignore properties from schema #2416
Conversation
@DjordyKoert This is the initial implementation of the feature — it's a very basic, functional version but still requires significant work. I’d appreciate your input on a couple of points:
Looking forward to your feedback! |
Probably not, this would prevent the attribute from working on other environments (Hateoas / JMS / Form). I think you can add a new method. I think its easiest to add a new method to https://github.com/nelmio/NelmioApiDocBundle/blob/master/src/ModelDescriber/Annotations/AnnotationsReader.php (something like
IMO annotation logic for PHP <8.0 isn't necessary to reduce complexity & annotations are about to be removed in |
aa8b81e
to
8586a1e
Compare
@DjordyKoert I've updated the implementation and added some tests. Could you please give it a quick look if this approach works better? If so, I'd look into the failing tests that are mainly related to Symfony 5.4 🤔 |
Looking good 😄 |
54656fa
to
4e597f1
Compare
4e597f1
to
dfe2ca1
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2416 +/- ##
==========================================
+ Coverage 90.18% 90.22% +0.03%
==========================================
Files 94 94
Lines 3067 3079 +12
==========================================
+ Hits 2766 2778 +12
Misses 301 301 ☔ View full report in Codecov by Sentry. |
@DjordyKoert Thanks for your input, the PR should be ready to review now 😄 |
Description
Adds a
#[Ignore]
attribute that allows a property to be excluded from the generated schema.Closes #2306
What type of PR is this? (check all applicable)
Checklist
docs/
)CHANGELOG.md
)