asyncapi / spec-json-schemas

AsyncAPI schema versions
Apache License 2.0
56 stars 54 forks source link

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

Closed jonaslagoni closed 6 months ago

jonaslagoni commented 8 months ago

Description After having a look at the multiFormatSchema file for https://github.com/asyncapi/spec-json-schemas/pull/495, there is no reason to do this extra check as everything comes through anySchema.

Blocked by https://github.com/asyncapi/spec-json-schemas/pull/495

sonarcloud[bot] commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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

Pakisan commented 8 months ago

@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 commented 8 months ago

No not at all :v:

@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 😄