Reputation: 4084
I use swashbuckle to generate a swagger page. In response part, I can see schema link:
But at the request part, I only see example, but not schema link:
This is my c# code
[HttpPost]
[ApiVersion("2.0")]
[Route("v2.0/Data")]
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(FundInfoSimpleResponse))]
[SwaggerRequestExample(typeof(FundInfoSimpleRequestV11), typeof(FundInfoSimpleRequestExampleV11))]
[SwaggerResponseExample((int)HttpStatusCode.OK, typeof(FundInfoSimpleResponseExample))]
public async Task<HttpResponseMessageResult> FundInfoSimple([FromBody] FundInfoSimpleRequestV11 request)
What am I missing?
Upvotes: 0
Views: 344
Reputation: 1105
The schema is only displayed when you are not in Try it out
mode. By the way, one can change the default behavior by using:
app.UseSwaggerUI(options =>
{
options.EnableTryItOutByDefault();
});
Upvotes: 0