You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we know the openapi-validator and swagger-validator can validate the request body if the body is parsed by the body handler. For put, post and patch request, if the body is missing from the exchange attachment, an error message that indicates the body is missing will be returned. There are two different situations that we cannot use the body parser in the request chain as once the stream is consumed, it won't be available for the downstream handlers anymore.
Validation in light-router and light-proxy. We have to keep the body stream to pass to the downstream service so we cannot consume it.
In light-spring-boot application. We have to keep the body so that Spring Boot can consume it.
To ensure that the two situations are handled correctly, we have to skip the body validation in the validator if the body cannot be found in the exchange. So the idea is to add another flag in the openapi-validator.yml and swagger-validator.yml to skip the body validation. Other parts of the request are still validated.
The text was updated successfully, but these errors were encountered:
As we know the openapi-validator and swagger-validator can validate the request body if the body is parsed by the body handler. For put, post and patch request, if the body is missing from the exchange attachment, an error message that indicates the body is missing will be returned. There are two different situations that we cannot use the body parser in the request chain as once the stream is consumed, it won't be available for the downstream handlers anymore.
Validation in light-router and light-proxy. We have to keep the body stream to pass to the downstream service so we cannot consume it.
In light-spring-boot application. We have to keep the body so that Spring Boot can consume it.
To ensure that the two situations are handled correctly, we have to skip the body validation in the validator if the body cannot be found in the exchange. So the idea is to add another flag in the openapi-validator.yml and swagger-validator.yml to skip the body validation. Other parts of the request are still validated.
The text was updated successfully, but these errors were encountered: