Closed proggarapsody closed 1 year ago
This could (and should :)) be configured in the OpenAPI.
Here's the documentation for Responses
section: https://swagger.io/docs/specification/describing-responses/
As you could see, you could specify response codes and results there. It will be handled by react-query-swagger
as well.
If you use ASP.Net Core I could send you some other links for configuring it there :)
@Shaddix Yes i am. This would be grateful if you share .net config links with me
You could add [ProducesResponseType(201)]
attribute to your Action
Or add it globally
services.AddControllers((options) => options.Filters.Add(new ProducesResponseTypeAttribute(201)));
@Shaddix Thanks i'll try it
I receive 201 success response, but the error still appears![изображение](https://user-images.githubusercontent.com/76034634/215834266-7f1b05ee-7e43-4594-b626-9d43facc33df.png)
I think, probably, we can handle 201 status as success too![изображение](https://user-images.githubusercontent.com/76034634/215834323-c5149d90-64a8-4dc9-8406-ea7c0d5761ba.png)