Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiModel and ApiModelProperty description isn't rendered in swagger.json #684

Closed
takezoe opened this issue Jul 5, 2017 · 0 comments
Closed
Assignees
Labels

Comments

@takezoe
Copy link
Member

takezoe commented Jul 5, 2017

Suppose we have a following model:

@ApiModel(description = "A price for an offer.")
case class OfferPrice(
  @ApiModelProperty(description = "The amount.") amount: Double,
  @ApiModelProperty(description = "The tax amount.") taxAmount: Double,
  @ApiModelProperty(description = "The tax rate.") taxRate: Option[Double]
)

Scalatra's Swagger 2.0 support renders it as follows. descriptions are not rendered:

{
  "OfferPrice": {
    "properties": {
      "amount": {
        "type": "number",
        "format": "double"
      },
      "taxAmount": {
        "type": "number",
        "format": "double"
      },
      "taxRate": {
        "type": "number",
        "format": "double"
      }
    }
  }
}
@takezoe takezoe added the swagger label Jul 5, 2017
@takezoe takezoe self-assigned this Jul 5, 2017
takezoe added a commit to takezoe/scalatra that referenced this issue Jul 9, 2017
takezoe added a commit to takezoe/scalatra that referenced this issue Jul 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant