コード例 #1
0
 /// <summary>
 /// Gets the HTTP 200, 201, 202 or 204 response, if any.
 /// </summary>
 public static OpenApiResponse?Get20XResponse(this OpenApiOperation operation)
 => operation.GetResponse(HttpStatusCode.OK)
 ?? operation.GetResponse(HttpStatusCode.Created)
 ?? operation.GetResponse(HttpStatusCode.Accepted)
 ?? operation.GetResponse(HttpStatusCode.NoContent);
コード例 #2
0
 public static IDictionary <string, OpenApiMediaType> Get20XResponse([NotNull] this OpenApiOperation operation)
 => operation.GetResponse(HttpStatusCode.OK)
 ?? operation.GetResponse(HttpStatusCode.Created)
 ?? operation.GetResponse(HttpStatusCode.Accepted);
コード例 #3
0
 /// <summary>
 /// Gets the HTTP 200 response, if any.
 /// </summary>
 public static OpenApiResponse?Get200Response(this OpenApiOperation operation)
 => operation.GetResponse(HttpStatusCode.OK);
コード例 #4
0
 public static IDictionary <string, OpenApiMediaType> Get200Response([NotNull] this OpenApiOperation operation)
 => operation.GetResponse(HttpStatusCode.OK);