use of io.swagger.v3.oas.models.security.SecurityScheme.In in project swagger-parser by swagger-api.
the class V2ConverterTest method testIssue6.
@Test(description = "Default value in parameters")
public void testIssue6() throws Exception {
OpenAPI oas = getConvertedOpenAPIFromJsonFile(ISSUE_6_JSON);
assertEquals(DEFAULT_VALUE, oas.getPaths().get(PETS_PATH).getGet().getParameters().get(0).getSchema().getDefault());
}
use of io.swagger.v3.oas.models.security.SecurityScheme.In in project swagger-parser by swagger-api.
the class V2ConverterTest method testIssue745.
@Test(description = "Issue in converting server url in RFC 3986 format from OpenAPI Spec 2 to Open API Spec 3")
public void testIssue745() throws Exception {
OpenAPI oas = getConvertedOpenAPIFromJsonFile(ISSUE_745_YAML);
assertTrue(oas.getServers().get(0).getUrl().startsWith("//"));
}
use of io.swagger.v3.oas.models.security.SecurityScheme.In in project swagger-parser by swagger-api.
the class V2ConverterTest method testIssue13.
@Test(description = "Extensions in External Docs")
public void testIssue13() throws Exception {
OpenAPI oas = getConvertedOpenAPIFromJsonFile(ISSUE_13_JSON);
assertNotNull(oas.getExternalDocs());
}
use of io.swagger.v3.oas.models.security.SecurityScheme.In in project swagger-parser by swagger-api.
the class V2ConverterTest method testPreserveBodyParameterName.
@Test(description = "OpenAPI v2 Converter: Ensure body name is preserved in x-codegen-request-body-name extension")
public void testPreserveBodyParameterName() throws Exception {
final OpenAPI oas = getConvertedOpenAPIFromJsonFile(ISSUE_762_JSON);
assertNotNull(oas);
assertEquals(oas.getPaths().get("/").getPut().getExtensions().get("x-codegen-request-body-name"), "pet");
}
use of io.swagger.v3.oas.models.security.SecurityScheme.In in project swagger-parser by swagger-api.
the class V2ConverterTest method testIssue758.
@Test(description = "OpenAPI v2 converter - NPE when 'enum' field is available and 'type' field is missing in query parameter")
public void testIssue758() throws Exception {
final OpenAPI oas = getConvertedOpenAPIFromJsonFile(ISSUE_758_JSON);
assertNotNull(oas);
}
Aggregations