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

chore: remove unnecessary validation check for multi format schema #507

Closed

Conversation

jonaslagoni
Copy link
Member

@jonaslagoni jonaslagoni commented Mar 27, 2024

Description
After having a look at the multiFormatSchema file for #495, there is no reason to do this extra check as everything comes through anySchema.

Blocked by #495

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Pakisan
Copy link
Member

Pakisan commented Mar 27, 2024

nope:

AssertionError [ERR_ASSERTION]: Document /Users/pavelbodyachevskiy/IdeaProjects/spec-json-schemas/test/docs/3.0.0/streetlights-all.json must be validated correctly: [
    {
        "instancePath": "/components/schemas/Json-ReferencedSchema",
        "schemaPath": "#/required",
        "keyword": "required",
        "params": {
            "missingProperty": "$ref"
        },
        "message": "must have required property '$ref'"
    },
    {
        "instancePath": "/components/schemas/Json-ReferencedSchema/schema",
        "schemaPath": "#/allOf/2/then/properties/schema/oneOf",
        "keyword": "oneOf",
        "params": {
            "passingSchemas": [
                0,
                1
            ]
        },
        "message": "must match exactly one schema in oneOf"
    },
    {
        "instancePath": "/components/schemas/Json-ReferencedSchema",
        "schemaPath": "#/allOf/2/if",
        "keyword": "if",
        "params": {
            "failingKeyword": "then"
        },
        "message": "must match \"then\" schema"
    },
    {
        "instancePath": "/components/schemas/Json-ReferencedSchema",
        "schemaPath": "#/if",
        "keyword": "if",
        "params": {
            "failingKeyword": "then"
        },
        "message": "must match \"then\" schema"
    },
    {
        "instancePath": "/components/schemas/Json-ReferencedSchema",
        "schemaPath": "#/properties/schemas/patternProperties/%5E%5B%5Cw%5Cd%5C.%5C-_%5D%2B%24/oneOf",
        "keyword": "oneOf",
        "params": {
            "passingSchemas": null
        },
        "message": "must match exactly one schema in oneOf"
    }
]

@jonaslagoni
Copy link
Member Author

@Pakisan it does not solve your problem, but it cleans up the definition even more after your PR is merged.

@Pakisan
Copy link
Member

Pakisan commented Mar 27, 2024

@Pakisan it does not solve your problem, but it cleans up the definition even more after your PR is merged.

Ok. I thought that this MR is for replace my changes

@jonaslagoni
Copy link
Member Author

jonaslagoni commented Mar 27, 2024

No not at all ✌️

@Pakisan I also see you have this change in your own PR, so if it is merged before this one with these changes I will just close this PR 🙂

It's just so I do not forget about it 😄

@jonaslagoni jonaslagoni marked this pull request as draft March 27, 2024 12:23
@jonaslagoni jonaslagoni deleted the unwrap_multiformat_schema branch May 13, 2024 06:48
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

Successfully merging this pull request may close these issues.

2 participants