|
19 | 19 | import io.vertx.openapi.contract.Parameter; |
20 | 20 | import io.vertx.openapi.contract.Path; |
21 | 21 | import io.vertx.openapi.mediatype.ContentAnalyserFactory; |
22 | | -import io.vertx.openapi.mediatype.MediaTypeRegistration; |
23 | 22 | import io.vertx.openapi.mediatype.MediaTypePredicate; |
24 | 23 | import io.vertx.openapi.mediatype.MediaTypeRegistry; |
25 | 24 | import io.vertx.openapi.mediatype.impl.DefaultMediaTypeRegistration; |
|
30 | 29 | public class ContractExamples { |
31 | 30 |
|
32 | 31 | public void createContract(Vertx vertx) { |
33 | | - String pathToContract = ".../.../myContract.json"; // json or yaml |
| 32 | + String pathToContract = "../../myContract.json"; // json or yaml |
34 | 33 | Future<OpenAPIContract> contract = OpenAPIContract.from(vertx, pathToContract); |
35 | 34 | } |
36 | 35 |
|
37 | 36 | public void createContractAdditionalFiles(Vertx vertx) { |
38 | | - String pathToContract = ".../.../myContract.json"; // json or yaml |
39 | | - String pathToComponents = ".../.../myComponents.json"; // json or yaml |
| 37 | + String pathToContract = "../../myContract.json"; // json or yaml |
| 38 | + String pathToComponents = "../../myComponents.json"; // json or yaml |
40 | 39 | Map<String, String> additionalContractFiles = new HashMap<>(); |
41 | 40 | additionalContractFiles.put("https://example.com/pet-components", |
42 | 41 | pathToComponents); |
@@ -68,8 +67,8 @@ private OpenAPIContract getContract() { |
68 | 67 | } |
69 | 68 |
|
70 | 69 | public void createContractWithCustomMediaTypes(Vertx vertx) { |
71 | | - String pathToContract = ".../.../myContract.json"; // json or yaml |
72 | | - String pathToComponents = ".../.../myComponents.json"; // json or yaml |
| 70 | + String pathToContract = "../../myContract.json"; // json or yaml |
| 71 | + String pathToComponents = "../../myComponents.json"; // json or yaml |
73 | 72 |
|
74 | 73 | Future<OpenAPIContract> contract = |
75 | 74 | OpenAPIContract.builder(vertx) |
|
0 commit comments