|
1 | 1 | package io.swagger.v3.parser.test;
|
2 | 2 |
|
3 | 3 |
|
| 4 | +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; |
| 5 | +import static com.github.tomakehurst.wiremock.client.WireMock.get; |
| 6 | +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; |
| 7 | +import static java.util.Arrays.asList; |
| 8 | +import static java.util.Collections.emptyList; |
| 9 | +import static org.hamcrest.CoreMatchers.equalTo; |
| 10 | +import static org.hamcrest.CoreMatchers.instanceOf; |
| 11 | +import static org.hamcrest.CoreMatchers.notNullValue; |
| 12 | +import static org.junit.Assert.assertThat; |
| 13 | +import static org.testng.Assert.assertEquals; |
| 14 | +import static org.testng.Assert.assertFalse; |
| 15 | +import static org.testng.Assert.assertNotNull; |
| 16 | +import static org.testng.Assert.assertNull; |
| 17 | +import static org.testng.Assert.assertTrue; |
| 18 | +import static org.testng.Assert.fail; |
| 19 | + |
4 | 20 | import java.io.File;
|
5 | 21 | import java.io.IOException;
|
6 | 22 | import java.math.BigDecimal;
|
|
14 | 30 | import java.util.Random;
|
15 | 31 | import java.util.Set;
|
16 | 32 |
|
| 33 | +import org.apache.commons.io.FileUtils; |
| 34 | +import org.hamcrest.CoreMatchers; |
| 35 | +import org.testng.Assert; |
| 36 | +import org.testng.annotations.AfterClass; |
| 37 | +import org.testng.annotations.BeforeClass; |
| 38 | +import org.testng.annotations.Test; |
| 39 | +import org.testng.reporters.Files; |
| 40 | + |
17 | 41 | import com.fasterxml.jackson.databind.JsonNode;
|
18 | 42 | import com.fasterxml.jackson.databind.node.ObjectNode;
|
19 | 43 | import com.github.tomakehurst.wiremock.WireMockServer;
|
20 | 44 | import com.github.tomakehurst.wiremock.client.WireMock;
|
21 | 45 | import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
|
| 46 | + |
22 | 47 | import io.swagger.v3.core.util.Json;
|
23 | 48 | import io.swagger.v3.core.util.Yaml;
|
24 | 49 | import io.swagger.v3.oas.models.Components;
|
|
52 | 77 | import io.swagger.v3.parser.core.models.ParseOptions;
|
53 | 78 | import io.swagger.v3.parser.core.models.SwaggerParseResult;
|
54 | 79 | import mockit.Injectable;
|
55 |
| -import org.apache.commons.io.FileUtils; |
56 |
| -import org.apache.commons.lang3.StringUtils; |
57 |
| -import org.hamcrest.CoreMatchers; |
58 |
| -import org.testng.Assert; |
59 |
| -import org.testng.annotations.AfterClass; |
60 |
| -import org.testng.annotations.BeforeClass; |
61 |
| -import org.testng.annotations.Test; |
62 |
| -import org.testng.reporters.Files; |
63 |
| - |
64 |
| -import static java.util.Arrays.asList; |
65 |
| -import static java.util.Collections.emptyList; |
66 |
| - |
67 |
| -import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; |
68 |
| -import static com.github.tomakehurst.wiremock.client.WireMock.get; |
69 |
| -import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; |
70 |
| -import static org.hamcrest.CoreMatchers.equalTo; |
71 |
| -import static org.hamcrest.CoreMatchers.instanceOf; |
72 |
| -import static org.hamcrest.CoreMatchers.notNullValue; |
73 |
| -import static org.junit.Assert.assertNotEquals; |
74 |
| -import static org.junit.Assert.assertThat; |
75 |
| -import static org.testng.Assert.assertEquals; |
76 |
| -import static org.testng.Assert.assertFalse; |
77 |
| -import static org.testng.Assert.assertNotNull; |
78 |
| -import static org.testng.Assert.assertNull; |
79 |
| -import static org.testng.Assert.assertTrue; |
80 |
| -import static org.testng.Assert.fail; |
81 | 80 |
|
82 | 81 |
|
83 | 82 | public class OpenAPIV3ParserTest {
|
@@ -416,9 +415,9 @@ public void testCodegenIssue8601() {
|
416 | 415 |
|
417 | 416 | OpenAPI openAPI = parseResult.getOpenAPI();
|
418 | 417 | assertNotNull(openAPI.getComponents().getSchemas().get("status"));
|
419 |
| - assertNotNull(openAPI.getComponents().getSchemas().get("testBody")); |
| 418 | + assertNotNull(openAPI.getComponents().getSchemas().get("test_body")); |
420 | 419 | assertNotNull(openAPI.getComponents().getSchemas().get("inline_response_200"));
|
421 |
| - assertNotNull(openAPI.getComponents().getSchemas().get("testBody_1")); |
| 420 | + assertNotNull(openAPI.getComponents().getSchemas().get("test_body_1")); |
422 | 421 | assertNotNull(openAPI.getComponents().getSchemas().get("Test1"));
|
423 | 422 | assertNotNull(openAPI.getComponents().getSchemas().get("Test2"));
|
424 | 423 | }
|
|
0 commit comments