Skip to content

[Java][Spring][Inflector][Jax-RS] To fix various enum issues #3615

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

Merged
merged 5 commits into from
Aug 20, 2016

Conversation

wing328
Copy link
Contributor

@wing328 wing328 commented Aug 19, 2016

TODO: add test cases to cover the enum issues in spring, inflector and jaxrs moving forward.

@wing328 wing328 merged commit 4e20bd9 into swagger-api:master Aug 20, 2016
@wing328 wing328 deleted the bug/issue3509 branch August 20, 2016 09:54
@deveshpujari
Copy link

It does not work for language jaxrs .
I tried using 2.2.3 and 2.3.0 lastest snapshot also.

public enum HealthType {

OVERALL("overall"),

CONNECTED("connected"),

ONBOARDED("onboarded");

private String value;

HealthType(String value) {
this.value = value;
}

@OverRide
public String toString() {
return String.valueOf(value);
}

@JsonCreator
public static HealthType fromValue(String text) {
for (HealthType b : HealthType.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}

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

Successfully merging this pull request may close these issues.

2 participants