What is [ProducesDefaultResponseType]? What status will it generate in the OpenAPI? What will it look like in Swagger?
Quick google shows that it will show a 0 and no description. That doesn't make sense to me.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I have also tried to figure this out but there is no details about this attribute
I think it is for describing what the content will be for any responses that aren't specified by other ProducesResponseType attributes. See the section "Default Response" in the Swagger docs: https://swagger.io/docs/specification/describing-responses/
@scottaddie please respond. Perhaps point to source code?
@DotNetSparky is correct - it's meant for Default Responses - https://swagger.io/docs/specification/describing-responses/#default
I would create a new convention for authentication that applies to all actions. Example - I would like to apply attribute [SwaggerResponse((int)HttpStatusCode.Unauthorized)] OR [ProducesResponseType((int)HttpStatusCode.Unauthorized)] for all actions. Is that possible.
Most helpful comment
I have also tried to figure this out but there is no details about this attribute