Open MassimoC opened 5 years ago
Introduce ConsumesAttribute
and ProducesAttribute
Having the operations decorated with these attributes should also affect the Swagger documentation.
For example:
[SwaggerResponse((int)HttpStatusCode.OK, "Player data object")]
[SwaggerResponse((int)HttpStatusCode.NotFound, "Player not found")]
[SwaggerResponse((int)HttpStatusCode.InternalServerError, "API is not available")]
[Produces("application/json")]
public async Task<IActionResult> GetPlayer(int id) {}
What's the point to have application/json and text/json? We should remove text/json
Regarding text/json, application/json: I just took that over from the code at hand. Also to show how multiple contenttypes can be specified. But for me, it is OK to drop text/json.
Ref #102 and #103
@filipvanraemdonck is working on this. Pending invite to assign to him.
provide guidelines on content negotiation (accept / content-type).