@Test(dataProvider = "data") public void readSecurityRequirementsObject(JsonNode rootNode) throws Exception { final OpenAPIDeserializer deserializer = new OpenAPIDeserializer(); final SwaggerParseResult result = deserializer.deserialize(rootNode); Assert.assertNotNull(result); final OpenAPI openAPI = result.getOpenAPI(); Assert.assertNotNull(openAPI); final List<SecurityRequirement> requirements = openAPI.getSecurity(); Assert.assertNotNull(requirements); Assert.assertEquals(requirements.size(),2); SecurityRequirement requirement = requirements.get(0); assertTrue(requirement.containsKey("api_key")); requirement = requirements.get(1); assertTrue(requirement.containsKey("tokenAuth")); }
public SwaggerParseResult deserialize(JsonNode rootNode) { return deserialize(rootNode, null); }
OpenAPIDeserializer { public SwaggerParseResult deserialize(JsonNode rootNode) { return deserialize(rootNode, null); } }
OpenAPIDeserializer { public SwaggerParseResult deserialize(JsonNode rootNode) { return deserialize(rootNode, null); }  }
OpenAPIDeserializer { public SwaggerParseResult deserialize(JsonNode rootNode) { return deserialize(rootNode, null); }  SwaggerParseResult deserialize(JsonNode rootNode); SwaggerParseResult deserialize(JsonNode rootNode, String path); OpenAPI parseRoot(JsonNode node, ParseResult result, String path); String mungedRef(String refString); Map<String,Object> getExtensions(ObjectNode node); Components getComponents(ObjectNode obj, String location, ParseResult result); List<Tag> getTagList(ArrayNode obj, String location, ParseResult result); Tag getTag(ObjectNode obj, String location, ParseResult result); List<Server> getServersList(ArrayNode obj, String location, ParseResult result, String path); List<Server> getServersList(ArrayNode obj, String location, ParseResult result); Server getServer(ObjectNode obj, String location, ParseResult result); Server getServer(ObjectNode obj, String location, ParseResult result, String path); ServerVariables getServerVariables(ObjectNode obj, String location, ParseResult result); ServerVariable getServerVariable(ObjectNode obj, String location, ParseResult result); Paths getPaths(ObjectNode obj, String location, ParseResult result); List<Operation> getAllOperationsInAPath(PathItem pathObj); PathItem getPathItem(ObjectNode obj, String location, ParseResult result); ExternalDocumentation getExternalDocs(ObjectNode node, String location, ParseResult result); String getString(String key, ObjectNode node, boolean required, String location, ParseResult result, Set<String> uniqueValues); String getString(String key, ObjectNode node, boolean required, String location, ParseResult result); Set<String> getKeys(ObjectNode node); ObjectNode getObject(String key, ObjectNode node, boolean required, String location, ParseResult result); Info getInfo(ObjectNode node, String location, ParseResult result); License getLicense(ObjectNode node, String location, ParseResult result); Contact getContact(ObjectNode node, String location, ParseResult result); Content getContent(ObjectNode node, String location, ParseResult result); MediaType getMediaType(ObjectNode contentNode, String location, ParseResult result); Map<String,Encoding> getEncodingMap(ObjectNode node, String location, ParseResult result); Encoding getEncoding(ObjectNode node, String location, ParseResult result); Map<String, Link> getLinks(ObjectNode obj, String location, ParseResult result, boolean underComponents); Link getLink(ObjectNode linkNode, String location, ParseResult result); Map <String,Callback> getCallbacks(ObjectNode node, String location, ParseResult result, boolean underComponents); Callback getCallback(ObjectNode node,String location, ParseResult result); XML getXml(ObjectNode node, String location, ParseResult result); ArrayNode getArray(String key, ObjectNode node, boolean required, String location, ParseResult result); Boolean getBoolean(String key, ObjectNode node, boolean required, String location, ParseResult result); BigDecimal getBigDecimal(String key, ObjectNode node, boolean required, String location, ParseResult result); Integer getInteger(String key, ObjectNode node, boolean required, String location, ParseResult result); Map<String, Parameter> getParameters(ObjectNode obj, String location, ParseResult result, boolean underComponents); List<Parameter> getParameterList(ArrayNode obj, String location, ParseResult result); Parameter getParameter(ObjectNode obj, String location, ParseResult result); Map<String, Header> getHeaders(ObjectNode obj, String location, ParseResult result, boolean underComponents); Header getHeader(ObjectNode headerNode, String location, ParseResult result); Object getAnyExample(String nodeKey,ObjectNode node, String location, ParseResult result ); Map<String, SecurityScheme> getSecuritySchemes(ObjectNode obj, String location, ParseResult result, boolean underComponents); SecurityScheme getSecurityScheme(ObjectNode node, String location, ParseResult result); OAuthFlows getOAuthFlows(ObjectNode node, String location, ParseResult result); OAuthFlow getOAuthFlow(String oAuthFlowType, ObjectNode node, String location, ParseResult result); Map<String, Schema> getSchemas(ObjectNode obj, String location, ParseResult result, boolean underComponents); Discriminator getDiscriminator(ObjectNode node, String location, ParseResult result); Schema getSchema(ObjectNode node, String location, ParseResult result); Map<String, Example> getExamples(ObjectNode obj, String location, ParseResult result, boolean  underComponents); List<Example> getExampleList(ArrayNode obj, String location, ParseResult result); Example getExample(ObjectNode node, String location, ParseResult result); void setStyle(String value, Parameter parameter, String location, ObjectNode obj, ParseResult result); ApiResponses getResponses(ObjectNode node, String location, ParseResult result, boolean underComponents); ApiResponse getResponse(ObjectNode node, String location, ParseResult result); List<String> getTagsStrings(ArrayNode nodes, String location, ParseResult result); Operation getOperation(ObjectNode obj, String location, ParseResult result); List<SecurityRequirement> getSecurityRequirementsList(ArrayNode nodes, String location, ParseResult result); Map<String, RequestBody> getRequestBodies(ObjectNode obj, String location, ParseResult result, boolean underComponents); String inferTypeFromArray(ArrayNode an); }
OpenAPIDeserializer { public SwaggerParseResult deserialize(JsonNode rootNode) { return deserialize(rootNode, null); }  SwaggerParseResult deserialize(JsonNode rootNode); SwaggerParseResult deserialize(JsonNode rootNode, String path); OpenAPI parseRoot(JsonNode node, ParseResult result, String path); String mungedRef(String refString); Map<String,Object> getExtensions(ObjectNode node); Components getComponents(ObjectNode obj, String location, ParseResult result); List<Tag> getTagList(ArrayNode obj, String location, ParseResult result); Tag getTag(ObjectNode obj, String location, ParseResult result); List<Server> getServersList(ArrayNode obj, String location, ParseResult result, String path); List<Server> getServersList(ArrayNode obj, String location, ParseResult result); Server getServer(ObjectNode obj, String location, ParseResult result); Server getServer(ObjectNode obj, String location, ParseResult result, String path); ServerVariables getServerVariables(ObjectNode obj, String location, ParseResult result); ServerVariable getServerVariable(ObjectNode obj, String location, ParseResult result); Paths getPaths(ObjectNode obj, String location, ParseResult result); List<Operation> getAllOperationsInAPath(PathItem pathObj); PathItem getPathItem(ObjectNode obj, String location, ParseResult result); ExternalDocumentation getExternalDocs(ObjectNode node, String location, ParseResult result); String getString(String key, ObjectNode node, boolean required, String location, ParseResult result, Set<String> uniqueValues); String getString(String key, ObjectNode node, boolean required, String location, ParseResult result); Set<String> getKeys(ObjectNode node); ObjectNode getObject(String key, ObjectNode node, boolean required, String location, ParseResult result); Info getInfo(ObjectNode node, String location, ParseResult result); License getLicense(ObjectNode node, String location, ParseResult result); Contact getContact(ObjectNode node, String location, ParseResult result); Content getContent(ObjectNode node, String location, ParseResult result); MediaType getMediaType(ObjectNode contentNode, String location, ParseResult result); Map<String,Encoding> getEncodingMap(ObjectNode node, String location, ParseResult result); Encoding getEncoding(ObjectNode node, String location, ParseResult result); Map<String, Link> getLinks(ObjectNode obj, String location, ParseResult result, boolean underComponents); Link getLink(ObjectNode linkNode, String location, ParseResult result); Map <String,Callback> getCallbacks(ObjectNode node, String location, ParseResult result, boolean underComponents); Callback getCallback(ObjectNode node,String location, ParseResult result); XML getXml(ObjectNode node, String location, ParseResult result); ArrayNode getArray(String key, ObjectNode node, boolean required, String location, ParseResult result); Boolean getBoolean(String key, ObjectNode node, boolean required, String location, ParseResult result); BigDecimal getBigDecimal(String key, ObjectNode node, boolean required, String location, ParseResult result); Integer getInteger(String key, ObjectNode node, boolean required, String location, ParseResult result); Map<String, Parameter> getParameters(ObjectNode obj, String location, ParseResult result, boolean underComponents); List<Parameter> getParameterList(ArrayNode obj, String location, ParseResult result); Parameter getParameter(ObjectNode obj, String location, ParseResult result); Map<String, Header> getHeaders(ObjectNode obj, String location, ParseResult result, boolean underComponents); Header getHeader(ObjectNode headerNode, String location, ParseResult result); Object getAnyExample(String nodeKey,ObjectNode node, String location, ParseResult result ); Map<String, SecurityScheme> getSecuritySchemes(ObjectNode obj, String location, ParseResult result, boolean underComponents); SecurityScheme getSecurityScheme(ObjectNode node, String location, ParseResult result); OAuthFlows getOAuthFlows(ObjectNode node, String location, ParseResult result); OAuthFlow getOAuthFlow(String oAuthFlowType, ObjectNode node, String location, ParseResult result); Map<String, Schema> getSchemas(ObjectNode obj, String location, ParseResult result, boolean underComponents); Discriminator getDiscriminator(ObjectNode node, String location, ParseResult result); Schema getSchema(ObjectNode node, String location, ParseResult result); Map<String, Example> getExamples(ObjectNode obj, String location, ParseResult result, boolean  underComponents); List<Example> getExampleList(ArrayNode obj, String location, ParseResult result); Example getExample(ObjectNode node, String location, ParseResult result); void setStyle(String value, Parameter parameter, String location, ObjectNode obj, ParseResult result); ApiResponses getResponses(ObjectNode node, String location, ParseResult result, boolean underComponents); ApiResponse getResponse(ObjectNode node, String location, ParseResult result); List<String> getTagsStrings(ArrayNode nodes, String location, ParseResult result); Operation getOperation(ObjectNode obj, String location, ParseResult result); List<SecurityRequirement> getSecurityRequirementsList(ArrayNode nodes, String location, ParseResult result); Map<String, RequestBody> getRequestBodies(ObjectNode obj, String location, ParseResult result, boolean underComponents); String inferTypeFromArray(ArrayNode an);  }