Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components object does not support x- specification extensions #376

Open
jlacivita opened this issue Mar 16, 2023 · 2 comments
Open

Components object does not support x- specification extensions #376

jlacivita opened this issue Mar 16, 2023 · 2 comments

Comments

@jlacivita
Copy link

The spec for Components object says:

This object MAY be extended with Specification Extensions.

However, the schema does not allow for this:

    "components": {
      "title": "components",
      "type": "object",
      "properties": {
        "schemas": {
          "title": "schemaComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/definitions/JSONSchema"
            }
          }
        },
        "links": {
          "title": "linkComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/definitions/linkObject"
            }
          }
        },
        "errors": {
          "title": "errorComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/definitions/errorObject"
            }
          }
        },
        "examples": {
          "title": "exampleComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/definitions/exampleObject"
            }
          }
        },
        "examplePairings": {
          "title": "examplePairingComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/definitions/examplePairingObject"
            }
          }
        },
        "contentDescriptors": {
          "title": "contentDescriptorComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/definitions/contentDescriptorObject"
            }
          }
        },
        "tags": {
          "title": "tagComponents",
          "type": "object",
          "patternProperties": {
            "[0-z]+": {
              "$ref": "#/definitions/tagObject"
            }
          }
        }
      }
    }

Is this a bug, or a copy/paste error in the spec?

Supporting x- extensions in the components object would be quite useful for storing specific types of reusable objects that are domain-specific.

@github-actions
Copy link

Welcome to OpenRPC! Thank you for taking the time to create an issue. Please review the guidelines

@BelfordZ
Copy link
Member

BelfordZ commented Jul 6, 2023

That makes a lot of sense to me, thanks for the suggestion.

do you want to make a PR / issue on meta-schema?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants