Open tstoian opened 4 years ago
When I try to validate my simple OpenAPI 3 definition (embedded below) against the OpenAPI 3 definition
$json = @' { "openapi": "3.0.0", "info": { "title": "myTitle", "version": "1.0" }, "paths": { "/resource": { "get": { "responses": { "200": { "description": "myDescription" } } } } } } '@ $schema = [NJsonSchema.JsonSchema]::FromUrlAsync('https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json').GetAwaiter().GetResult() $schema.Validate($json)
the Validate method generates the following error:
MethodInvocationException: C:\Git\APIM\APIM-Service\apim-pipeline-scripts\parse-openapi3.ps1:22:1 Line | 22 | $schema.Validate($json) | ~~~~~~~~~~~~~~~~~~~~~~~ | Exception calling "Validate" with "1" argument(s): "Invalid pattern '^\__referencePath$' at offset 3. Unrecognized | escape sequence \\_."
I validated my OpenApi 3 json against the OpenAPI 3 schema in several online validators and it is valid.
Probably fixed: https://github.com/RicoSuter/NJsonSchema/issues/1186
When I try to validate my simple OpenAPI 3 definition (embedded below) against the OpenAPI 3 definition
the Validate method generates the following error:
I validated my OpenApi 3 json against the OpenAPI 3 schema in several online validators and it is valid.