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

SchemaVer works with remote references #13

Open
widal001 opened this issue May 28, 2024 · 0 comments
Open

SchemaVer works with remote references #13

widal001 opened this issue May 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@widal001
Copy link
Owner

widal001 commented May 28, 2024

User stories

As someone generating releases using schema, I want schemaver to load/check remote schemas linked via the "$ref" attribute, so that I can accurately categorize changes made between referenced schemas.

Acceptance criteria

Assuming we have the following schemas we want to compare:

Old schema

{
    "type": "object",
    "properties": {
         "productId": {"type": "integer"},
         "productName": {"type": "string"},
         "tags": {"$ref": "https://example.com/tags/2023-01-01.json"},
    },
    "required": ["productId", "productName", "tags"]
}

New schema

{
    "type": "object",
    "properties": {
         "productId": {"type": "integer"},
         "productName": {"type": "string"},
         "tags": {"$ref": "https://example.com/tags/2024-01-03.json"},
    },
   "required": ["productId", "productName", "tags"]
}

And the two remote schemas referenced are:

.../tags/2023-01-01.json

{
    "type": "array",
    "items": {"type": "string"}
}

.../tags/2024-01-03.json

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "label": {"type": "string"},
            "tagId": {"type": "integer"}
        }
    }
}

The resulting release should have type model

@widal001 widal001 added the enhancement New feature or request label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant