-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
OpenAPI validation fails on Multiple methods defined on the same path #882
Comments
@h6ah4i Thank you for yor report! Are you talking about the same structure as this one? ( Lines 47 to 74 in 583c63a
|
It might be something different from the current test code. I'll create a sample code to reproduce the issue. |
@h6ah4i 🙏 Thank you!! |
@h6ah4i Thank you!! |
A workaround has been added to this issue. |
@k1LoW In v0.105.1, still I get so many OpenAPI validation errors like the followings in my setup.
However, I noticed a very important signal that triggers this issue today. These errors only occurs when I use the It seems that the validator instances of libopenapi-validator are not thread-safe (maybe they are not immutable object, says it has internal states). Basically, they should not be shared among threads. Otherwise you need to implement appropriate synchronization mechanism by using mutex or something else. I suppose the fix of the issue #889 was not perfect. It can avoid panics, but it is not sufficient to protect from concurrency access to the validator instances. |
@h6ah4i Thank you for your report! Fixed to have a validator for each HTTP runner (v0.105.2) and added the following tests. Lines 762 to 801 in 0f97e31
|
@k1LoW Thank you so much! I have confirmed that v0.105.2 resolved all OpenAPI validation errors in my setup 🎉 |
In OpenAPI, we can declare multiple methods under an endpoint path like this.
However, runn gives error like the following;
ref.) https://swagger.io/docs/specification/describing-responses/
(I have not confirmed yet, but it seems pb33f/libopenapi does not support the syntax.)
The text was updated successfully, but these errors were encountered: