fixing security test to make sense
@@ -48,47 +48,6 @@ import static org.testng.Assert.assertTrue;
public class OpenAPIDeserializerTest {
- @Test
- public void securityTest(@Injectable List<AuthorizationValue> auths){
- String yaml = "openapi: \"3.0.0\"\n" +
- "info:\n" +
- " title: Test OpenApi Specification\n" +
- " version: 1.0.0\n" +
- "paths:\n" +
- " /test:\n" +
- " get:\n" +
- " operationId: testGet\n" +
- " security:\n" +
- " - openId:\n" +
- " - https://scopes.example.com/myScope\n" +
- " responses:\n" +
- " 200:\n" +
- " description: get response.\n" +
- " content:\n" +
- " \"application/json\":\n" +
- " schema:\n" +
- " type: object\n" +
- "components:\n" +
- " security:\n" +
- " securitySchemes:\n" +
- " openId:\n" +
- " type: openIdConnect\n" +
- " openIdConnectUrl: https://....";
-
- OpenAPIV3Parser parser = new OpenAPIV3Parser();
-
- ParseOptions options = new ParseOptions();
- options.setResolve(true);
-
- SwaggerParseResult result = parser.readContents(yaml,auths,options);
-
-
- Operation operation = result.getOpenAPI().getPaths().get("/test").getGet();
- Assert.assertEquals(operation.getSecurity().get(0).get("openId").get(0), "https://scopes.example.com/myScope");
-
-
- }
-
@Test
public void testAllOfSchema(@Injectable List<AuthorizationValue> auths){
String yaml = "openapi: '3.0'\n" +
