Skip to content

Conversation

@quilicicf
Copy link
Contributor

Issue

The field description of security definitions is missing from the Java POJO, thus lost during deserialization.

Test

Tested with Swagger containing:

"securityDefinitions": {
  "securityDefinition1": {
    "type": "basic",
    "description": "Swagger.securityDefinitions.*.description"
  }
}

And main method:

Swagger swagger = Json.mapper().readValue(file.toFile(), Swagger.class);
System.out.println(swagger.getSecurityDefinitions().get("securityDefinition1").getDescription());

Output: Swagger.securityDefinitions.*.description

@webron
Copy link
Contributor

webron commented Oct 8, 2015

@quilicicf - thanks for this! Can you please just modify the code to following our standard guidelines? Specifically https://github.com/swagger-api/swagger-core/wiki/Coding-Standards#block-less-loops-and-if-statements? Referring specifically to the equals(*) implementation.

@quilicicf
Copy link
Contributor Author

@webron - you're welcome.
I've updated the code.

@webron webron added this to the v1.5.4 milestone Oct 9, 2015
webron added a commit that referenced this pull request Oct 9, 2015
…ription

Add description field in security definitions
@webron webron merged commit d492b56 into swagger-api:master Oct 9, 2015
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

Successfully merging this pull request may close these issues.

2 participants