-
Notifications
You must be signed in to change notification settings - Fork 7
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
Request content-type should default to application/json #105
Labels
Comments
@ethlo Thanks for bringing this up. I think it's in |
Thanks for the hints! I worked around it for now with: @Bean
public OperationPostFilter replaceContentType()
{
return (operation, handlerMethod) ->
{
final RequestBody rb = operation.getRequestBody();
if (rb != null)
{
final Content requestParams = rb.getContent();
final Iterator<Map.Entry<String, de.qaware.openapigeneratorforspring.model.media.MediaType>> requestsIter = requestParams.entrySet().iterator();
while (requestsIter.hasNext())
{
final Map.Entry<String, de.qaware.openapigeneratorforspring.model.media.MediaType> e = requestsIter.next();
if (ALL_VALUE.equals(e.getKey()))
{
requestsIter.remove();
requestParams.put(APPLICATION_JSON_VALUE, e.getValue());
}
}
}
return true;
};
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Spring defaults to
application/json
as expected content-type, this documenter should do the same (not*/*
)The text was updated successfully, but these errors were encountered: