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

Support alternate type resolution for @ModelAttribute annotated model fields #969

Closed
ejain opened this issue Sep 10, 2015 · 3 comments
Closed
Labels
Milestone

Comments

@ejain
Copy link
Contributor

ejain commented Sep 10, 2015

Given a class used as a @ModelAttribute like:

public class Query {
  @ApiModelProperty("some items")
  private List<UUID> items;
  ...
}

The Swagger spec SpringFox generates has this:

{
  "name": "items",
  "in": "query",
  "description": "some items",
  "required": false,
  "type": "ref"
}

Expected:

{
  "name": "items",
  "in": "query",
  "description": "some items",
  "required": false,
  "type": "array",
  "items": {
    "type": "string",
    "format": "uuid",
  }
}
@dilipkrish dilipkrish added this to the 2.3.0 milestone Sep 11, 2015
@dilipkrish
Copy link
Member

I think this is fixed in the latest snapshot. This is a duplicate of #929

@ejain
Copy link
Contributor Author

ejain commented Dec 5, 2015

Looks like this is still broken in 2.3.0.

@dilipkrish
Copy link
Member

Non scalar types are not supported for model attributes. Also it seems like it might be a good idea to support alternate type rules for model attributes as well.

Long winded way of saying yes this still broken.

@dilipkrish dilipkrish reopened this Dec 5, 2015
@dilipkrish dilipkrish modified the milestones: 2.4.0, 2.3.0 Dec 5, 2015
@dilipkrish dilipkrish changed the title List<UUID> in @ModelAttribute shows up as "ref" Support alternate type resolution for @ModelAttribute annotated model fields Dec 5, 2015
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

2 participants