Antoan Milkov
Antoan Milkov

Reputation: 2228

Formatting the Swagger output for classes

Is there a way to format the Swagger output in a better way when used with dummy classes? For example:

@return Account

The output is kind of messy for me due to the lack of new lines:

Messy class output from Swagger

Upvotes: 1

Views: 413

Answers (1)

Arul Kumaran
Arul Kumaran

Reputation: 993

It is created by swagger-ui at runtime, we will definitely be improving it over time We may replace it with model representation as formatted json instead.

For now you may remove the @return comment and directly add the html you want (that places Response Information in the way you want) under the long description, it will show up the same way

You can copy paste the same html you get on explorer for this purpose

Also you don't have to do this for all api methods, only to those that have lot of fields and appear messy

Upvotes: 1

Related Questions