remove $id and $schema from referred JSON schemata

Open
#70 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
json, python
Domain
api, testing-qa

Research direction

Start by tracing the URL-Handler and factory paths used when referred JSON schemata are handed to validators. Reproduce the OpenAPI 3 failure with a referenced schema containing "$id" and "$schema", then verify validation succeeds when those keys are removed before validation.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
409
Forks
73
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python-openapi/openapi-spec-validator

All issues in python-openapi/openapi-spec-validator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.