2

I am annotating action method with @ApiImplicitParams

new ApiImplicitParam(
    dataType = "Array[Model]", // <- What should I write here?
    paramType = "body",
    name = "body",
    required = true,
    allowMultiple = false,
    value = "The JSON array of messages to be logged.")

[LModel does not work as well.

1 Answer 1

4

You should be able to use dataTypeClass field, instead of dataType.

new ApiImplicitParam(
  dataTypeClass = classOf[Array[Model]],
  paramType = "body",
  name = "body",
  required = true,
  value = "The JSON array of messages to be logged.")
Sign up to request clarification or add additional context in comments.

3 Comments

looks like this property does not exist in swagger.core 1.5.8 which is referenced by swagger-play 1.5.3
yes, it seems to be added in swagger-core 1.5.13, that should be available in swagger-play 1.6.0 (only for play-2.6.x and above)
swagger-play 1.6.0 is based on swagger-core 1.5.12, so it this property is not available too

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.