Swagger UI and ServiceStack -
The service stack support model is in Swagger in the sample code below
[root (Root "(" / user "," post, put ", summary =" create a new user ")] [root (" / user "," GET ", summary =" make available to all users " User / {id} "," GET ", summary =" Get user with specific ID ")] Public class users: request buzz, erranton & lt; UserResponse & gt; {{Apamemel (name = "id", description = "user id", parameter type = "path", datatype = "int", iiReaded = falls}] public entry id {received; Set; } [Apemail (name = "user data", description = "user data", parameter type = "body", datatype = "complex", iiReaded = false)] public user entry {get; Set; }} I should have a complex type or container type of user data. However, if I define it to be one of them, then all I get in SwaggerUI is a text field box. I do not get the Model and Model Scheme link which I see online in the example of a pet.
"post-text" itemprop = "text"> Parameters of type "body" are supported correctly as the latest service stack release allows you to access your second ApiMember attribute will need to set the DataType = "User" . This will allow the Sager UI to display the model schema information properly. Also, for simple types, you can use constants in the SwaggerType class; For example, you can change the Apimember attribute to DataType = SwaggerType.Int .
Comments
Post a Comment