iheartradio / play-swagger

Swagger spec generator for play framework
Apache License 2.0
403 stars 131 forks source link

How can I add a description to a schema/model parameter? #205

Closed EdgarDorausch closed 1 year ago

EdgarDorausch commented 6 years ago

Let us say case class Category(id: Option[Int], name: String, parentId: Int) { ... } is our model. How can I add a description to (for example) parentId?

sohoffice commented 6 years ago

I've tweaked the play-swagger plugin so that it accepts a java properties file to supply the descriptions. A second plugin docExtract was added to extract scaladoc from your scala source files.

docExtract currently only works on scala files (it's implemented as a doclet of scaladoc) and it only supports sbt 1.0.

I can submit a pull request if you find the above useful.

Javakky-pxv commented 1 year ago

@EdgarDorausch @sohoffice The extraction of Scaladoc has been supported. ( #499 )