-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
2.0.0-SNAPSHOT: Strange behaviour after added @ApiModelProperty to enum attribute #667
Comments
@jfiala thanks for reporting! 👍 |
I just wanted to verify this, but after updating to the latest and starting spring:boot I get: java.lang.NullPointerException: null key in entry: null=springfox.documentation.spring.web.plugins.Docket@5ef9ca83
at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:31)
at com.google.common.collect.ImmutableMultimap$Builder.put(ImmutableMultimap.java:169)
at com.google.common.collect.ImmutableListMultimap$Builder.put(ImmutableListMultimap.java:167)
at com.google.common.collect.Multimaps.index(Multimaps.java:1509)
at com.google.common.collect.Multimaps.index(Multimaps.java:1455)
at springfox.documentation.spring.web.plugins.DuplicateGroupsDetector.ensureNoDuplicateGroups(DuplicateGroupsDetector.java:41) Can you please inspect this? Can be immediately reproduced using: |
@jfiala Cannot reproduced this. This is my environment Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T15:10:27-05:00)
Maven home: /usr/local/Cellar/maven/3.3.1/libexec
Java version: 1.7.0_60, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: US-ASCII
OS name: "mac os x", version: "10.10.3", arch: "x86_64", family: "mac"
|
entered commands: It fails in my Windows environment: It also fails in my Ubuntu environment: I don't think it has to do with the Maven/Java version. |
@jfiala will take a look now - doubt its maven or java version. |
Yep, it was recently introduced - I will fix it. springfox.documentation.spring.web.plugins.DuplicateGroupsDetector.ensureNoDuplicateGroups(DuplicateGroupsDetector.java:41) |
Should be fixed here: 8f01d4f |
2.0.0-SNAPSHOT: Exception can be reproduced using: |
It's an issue with component scanning plus the springfox-swagger and springfox-swagger-common modules have the same package namespace. |
@jfiala @dilipkrish I'm going to rename one of the modules and it package name: springfox-swagger > springfox-swagger and it's namespace from |
Renaming springfox-swagger module to springfox-swagger1
configuration to match the convention in swagger 2.0 related to #667
2.0.0-SNAPSHOT: springfox-core-2.0.0-20150411.131124-78
With:
the behaviour is correct:
"state":{"type":"string","enum":["ACTIVE","DISABLED"]}
But when I add the @ApiModelProperty annotation:
the following api-docs are generated:
"state":{"type":"string","description":"Current state"}
full api-docs:
demo:
https://github.com/jfiala/swagger-spring-demo/tree/master/user-rest-service-2.0.0
The text was updated successfully, but these errors were encountered: