-
-
Notifications
You must be signed in to change notification settings - Fork 321
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 required to responseField tag and append the required fields to generateResponseContentSpec for object types #814
Conversation
…s to generateResponseContentSpec for object types
…g required is part of the description
Could you add some tests as well? You don't necessarily need to add new tests, just find some of the tests around |
Yes, I will do that, but I will probably not be able to do it until 15.03.2024. |
Ready for review? It's still marked as draft. |
Hey @shalvah, I am a colleague of @yannick-softwerft and I finally found some time to continue work on this PR. I started writing tests and then I realized that this feature also has to support response fields where the entire path is specified. It is now implemented and ready for review. |
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.
LGTM
Can you add support in the |
That was actually working already. BTW: I think it's kind of a breaking change. I demonstrate this in the changes I just made in Maybe the default value of required in the ResponseField attribute has to be changed to false? |
Hmm, I think it is technically breaking, but likely low impact, so I wouldn't want to hold it back. |
Thanks! |
Extends the documentation for @responseField tags by adding the required field.
Format before was:
Format after is:
If required is set in the documentation it will set the new
$required
- property (ResponseField Dto) to true.All fields that have the required property set to true will be added to the openapi spec for object types.