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

Response type ignored by swagger #86

Open
GRYE opened this issue Dec 25, 2018 · 1 comment
Open

Response type ignored by swagger #86

GRYE opened this issue Dec 25, 2018 · 1 comment

Comments

@GRYE
Copy link

GRYE commented Dec 25, 2018

Hello everybody!

I've got something like this in my code

@GET
  @Path("/{id}")
  @ApiOperation(
    value = "Return item with given id",
    response = classOf[BaseResponse],
    responseContainer = "List")
  @ApiResponses(value = Array(new ApiResponse(code = 200, message = "Item response", response = classOf[BaseResponse])))
  def getItemByIdR: Route = (id & get) { key =>
    getItemById(key).okJson()
  }

Where BaseResponse is also annotated with @ApiModel, but when I request swagger.json, it has following return type of an operation:

"content": {
    "application/json": {
       "schema": {
            "$ref": "#/components/schemas/Function1RequestContextFutureRouteResult"
        }
   }
@pjfanning
Copy link
Collaborator

could you provide a reproducible test case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants