Closed joca-bt closed 1 year ago
patternProperties (https://json-schema.org/understanding-json-schema/reference/object.html#pattern-properties) is listed as supported here but when I try to parse an OAS with it I get an error:
patternProperties
[attribute is not of type `object`]
Java
Path file = Path.of("openapi.yaml"); OpenAPIParser parser = new OpenAPIParser(); SwaggerParseResult result = parser.readContents(file.toString(), Collections.emptyList(), new ParseOptions()); System.out.println(result.getMessages());
OAS
openapi: 3.1.0 info: title: Test API version: '1.0' paths: /test: post: requestBody: content: application/json: schema: type: object properties: static: type: string patternProperties: dynamic: type: string responses: '200': description: Success! content: application/json: schema: type: string
See test.zip for the full example.
Typo in the code.
patternProperties
(https://json-schema.org/understanding-json-schema/reference/object.html#pattern-properties) is listed as supported here but when I try to parse an OAS with it I get an error:Java
OAS
See test.zip for the full example.