Use generic ProducesResponseTypeAttribute instead of typeof(...) (#3074)

This commit is contained in:
Sebastian Göls
2023-11-16 21:49:15 +01:00
committed by GitHub
parent 5cbe11241c
commit 193f0e3c08
14 changed files with 82 additions and 82 deletions

View File

@@ -37,8 +37,8 @@ public sealed class StructureController : ArchiController {
/// Structure is defined as a representation of given object in its default state.
/// </remarks>
[HttpGet("{structure:required}")]
[ProducesResponseType(typeof(GenericResponse<object>), (int) HttpStatusCode.OK)]
[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)]
[ProducesResponseType<GenericResponse<object>>((int) HttpStatusCode.OK)]
[ProducesResponseType<GenericResponse>((int) HttpStatusCode.BadRequest)]
public ActionResult<GenericResponse> StructureGet(string structure) {
ArgumentException.ThrowIfNullOrEmpty(structure);