Skip to content

Commit

Permalink
Fix incorrect path separators when resolving schema ref on Windows OS…
Browse files Browse the repository at this point in the history
… - test case
  • Loading branch information
walaniam committed Mar 6, 2024
1 parent 03f0809 commit a1fb1b0
Showing 1 changed file with 16 additions and 0 deletions.
Expand Up @@ -3269,4 +3269,20 @@ public void test31SafeURLResolvingWithLocalhost() {
}
}
}

@Test
public void testIssue1886() {
ParseOptions options = new ParseOptions();
options.setResolve(true);
options.setFlatten(true);
OpenAPIV3Parser openApiParser = new OpenAPIV3Parser();
SwaggerParseResult parseResult = openApiParser.readLocation("issue-1886/openapi.yaml", null, options);
OpenAPI openAPI = parseResult.getOpenAPI();
assertEqualsNoOrder(
openAPI.getComponents().getSchemas().keySet(),
Arrays.asList("ArrayPojo", "Enum1", "Enum1_1", "Enum2", "Enum3", "MapPojo", "SetPojo", "SimplePojo",
"TransactionsPatchRequestBody", "additional-properties", "array-pojo", "locale-translation-item",
"map-pojo", "set-pojo", "simple-pojo", "translation-item")
);
}
}

0 comments on commit a1fb1b0

Please sign in to comment.