Closed chibicco closed 5 months ago
@brandur @ota42y
If you have a moment, I would appreciate it if you could review it. I apologize for my poor English skills, so please bear with me.
@chibicco Sorry for the delay. Do you still need this?
@brandur Thank you for response :)
Yes, I need this pull requests. I have rebased on the latest master, If possible, please review.
Greetings.
I have just noticed the following correction. https://github.com/interagent/committee/pull/420
If my PR is not appropriate, I would appreciate it if you could close it.
@chibicco Let's hold on that a bit longer. We have someone offering to help with maintenance so we may yet be able to rescue the project.
memo) I noticed in writing the following comment that 204 responses and so on expect to describe a response without a body. In other words, I think the next major update will change this parameters default value.
https://github.com/interagent/committee/pull/417#discussion_r1596566077
@ydah
Thank you for your review! I have added the necessary commits for the corrections and replied to the comments. I kindly ask for your confirmation.
@ydah I have updated the CHANGELOG.md :) We appreciate your kind support.
@brandur Thank you for merging the PR. Could you kindly release the latest master at a time that is convenient for you?
@chibicco Yes! I believe @ydah is waiting for one more change on review feedback over on #396, after which he'll cut a release and get this shipped.
I see, I understand !
@chibicco Thank you for waiting. Since v5.3.0 has been released, so your patch has been released! Thank you for your great work! https://rubygems.org/gems/committee/versions/5.3.0
@ydah
I have confirmed the v5.3.0 release : ) Thank you!
Background
In our project, there are scenarios where the API returns an empty response body with status code 200. However, the current OpenAPI 2 schema validation does not allow an empty schema for the response body, causing validation errors in these cases.
Specifically, in cases such as the schema and controller example below, I expect the Committee::Middleware::ResponseValidation check to pass successfully.
Changes
To address this issue, I have added an option to allow an empty schema for the response body in OpenAPI 2. This change enables the validation to pass when both the schema and response body are nil, accommodating the specific use case in our project.