You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openapi: 3.0.1
info:
title: OpenAPI Test
description: Simple test
license:
name: Apache-2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: http://localhost:9999/v2
paths:
/ping:
post:
tags:
- someTag
summary: test
description: test it
operationId: pingOp
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SomeObj'
required: true
responses:
200:
description: OK
content: {}
components:
schemas:
SomeObj:
type: string
pattern: ^[A-Z]+$
This test fails:
@Test
public void testPattern() {
final OpenAPI openAPI = new OpenAPIParser().readLocation(“../testPattern.yaml", null, new ParseOptions()).getOpenAPI();
Schema s = openAPI.getComponents().getSchemas().get("SomeObj");
Assert.assertEquals(s.getPattern(),"^[A-Z]+$"); //ERROR: got null
}
The text was updated successfully, but these errors were encountered:
Consider this OAS3 spec (
testPattern.yaml
):This test fails:
The text was updated successfully, but these errors were encountered: