openapi-spec-validator
openapi-spec-validator copied to clipboard
remove $id and $schema from referred JSON schemata
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.
This also applies to the patternProperties property. This is allowed by this validator but according to OpenAPI spec it is not:

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