Skip to content
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

AspNetCore.Mvc.Formatters Improvements #1176

Closed
hankovich opened this issue Jan 27, 2021 · 2 comments
Closed

AspNetCore.Mvc.Formatters Improvements #1176

hankovich opened this issue Jan 27, 2021 · 2 comments

Comments

@hankovich
Copy link
Contributor

Currently MessagePackInputFormatter implements IInputFormatter which makes sense, but IInputFormatter does not provide any info about format for ApiExplorer, so ApiExplorer doesn't know that the application also supports application/x-msgpack.
I suggest using InputFormatter instead of IInputFormatter. InputFormatter also has a set of supported content types, so ApiExplorer will be aware of application/x-msgpack support. This way the generated Swagger documents will also contain information about application/x-msgpack.

Same goes for MessagePackOutputFormatter (change IOutputFormatter to OutputFormatter).

@AArnott
Copy link
Collaborator

AArnott commented Jan 30, 2021

That sounds useful. Would you care to send a PR?

hankovich added a commit to hankovich/MessagePack-CSharp that referenced this issue Jan 31, 2021
@hankovich
Copy link
Contributor Author

@AArnott yes, sure!
Please take a look at #1179

AArnott added a commit that referenced this issue Feb 18, 2021
Implement #1176 (AspNetCore.Mvc.Formatters Improvements)
@AArnott AArnott closed this as completed Feb 18, 2021
@AArnott AArnott added this to the v2.3 milestone Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants