We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The subject is ugly mostly for tests. If one test needs custom decoder, but another expects to use original one this case is sucks.
As a protection, you can offer a function to obtain a registered decoder so that it can be restored ...
The text was updated successfully, but these errors were encountered:
Could you show in code what you are suggesting please?
Sorry, something went wrong.
Something like
originalDecoder := openapi3filter.GetBodyDecoder({contentType}) openapi3filter.RegisterBodyDecoder({contentType}, {customDecoder}) ... openapi3filter.RegisterBodyDecoder({contentType}, originalDecoder)
Or offer default decoder registry, which will be used to fill in used decoders
openapi3filter.RegisterBodyDecoder({contentType}, openapi3filter.DefaultBodyDecoder({contentType}))
Successfully merging a pull request may close this issue.
The subject is ugly mostly for tests. If one test needs custom decoder, but another expects to use original one this case is sucks.
As a protection, you can offer a function to obtain a registered decoder so that it can be restored ...
The text was updated successfully, but these errors were encountered: