Home > Net >  Swagger display parameters
Swagger display parameters

Time:09-27

VS2017 WebApi + Swagger shows less than entity parameter annotation, please great god guide,
I want the results
https://images2015.cnblogs.com/blog/785625/201605/785625-20160505230831685-266018123.png

But I loaded, only type, there is no comment,
https://images2015.cnblogs.com/blog/785625/201605/785625-20160505225033591-1493263299.png

SwaggerConfig I have load the XML has generated,
 
C.I ncludeXmlComments (string Format (" {0}/bin/WebTestAPI XML ", System. AppDomain. CurrentDomain. BaseDirectory));

CodePudding user response:

Nobody answer?

CodePudding user response:

Because you don't click on the model, model where only show them

CodePudding user response:

Add @ ApiModelProperty try ()
https://blog.csdn.net/qq_32917699/article/details/81486060

CodePudding user response:

On your entity class add @ ApiModelProperty annotation

CodePudding user response:

Ha ha ha, little brother is bingo on the third floor
  •  Tags:  
  • C#
  • Related