play-swagger icon indicating copy to clipboard operation
play-swagger copied to clipboard

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

Open EdgarDorausch opened this issue 8 years ago • 1 comments

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?

EdgarDorausch avatar Dec 22 '17 22:12 EdgarDorausch

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.

sohoffice avatar Mar 18 '18 15:03 sohoffice

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

Javakky-pxv avatar Jul 21 '23 03:07 Javakky-pxv