Skip to content

Commit dc15b72

Browse files
committed
oas 3.1 - minor oas 3.1 test update
1 parent 67eacbc commit dc15b72

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

modules/swagger-parser-v3/src/test/java/io/swagger/v3/parser/test/OAI31DeserializationTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ public void testBasicOAS31() {
2020
SwaggerParseResult result = new OpenAPIV3Parser().readLocation( "3.1.0/test/basicOAS31.yaml", null, null);
2121
assertNotNull(result.getOpenAPI());
2222
OpenAPI openAPI = result.getOpenAPI();
23-
System.out.println("Messages: "+result.getMessages());
23+
System.out.println("Messages: \n");
24+
result.getMessages().forEach(System.out::println);
25+
26+
System.out.println("\n\nParsed: \n\n");
2427
Yaml31.prettyPrint(openAPI);
2528
//JsonSchemaDialect
2629
assertNotNull(openAPI.getJsonSchemaDialect());

modules/swagger-parser-v3/src/test/resources/3.1.0/test/basicOAS31.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ info:
1010
identifier: test identifier
1111
servers:
1212
- url: http://petstore.swagger.io/v1
13+
- url: http://{host}.swagger.io/v1
14+
variables:
15+
host:
16+
default: demo
17+
description: this value is assigned by the service provider
18+
enum: []
1319
webhooks:
1420
# Each webhook needs a name
1521
newPet:
@@ -138,6 +144,8 @@ components:
138144
format: int64
139145
name:
140146
type: string
147+
writeOnly: true
148+
readOnly: true
141149
testenum:
142150
type: string
143151
enum:
@@ -193,5 +201,7 @@ components:
193201
format: int64
194202
name:
195203
type: string
204+
patternProperties:
205+
'[a-b].*': 1
196206
MapAnyValue:
197207
additionalProperties: { }

0 commit comments

Comments
 (0)