openapi-spec-validator icon indicating copy to clipboard operation
openapi-spec-validator copied to clipboard

remove $id and $schema from referred JSON schemata

Open HRogge opened this issue 6 years ago • 1 comments

Is it possible with the openapi-spec-validator to remove the "$id" and "$schema" from referred schemata before handling them to the validators.

JSON schemata allow these two keys (and at least "$schema" is part of most schemata), but the OpenAPI3 specification fails when they appear within a reference.

I tried to change the URL-Handler of openapi-spec-validator, but it didn't worked so I assume I got lost in the maze of factories.

HRogge avatar Mar 29 '19 10:03 HRogge

This also applies to the patternProperties property. This is allowed by this validator but according to OpenAPI spec it is not:

image

For reference: https://swagger.io/docs/specification/data-models/keywords/

DerkSchooltink avatar Aug 12 '20 14:08 DerkSchooltink