Validate referenced objects
Closed this issue · 2 comments
First step:
-
Collect all objects which can be referenced in the
2.1.0
schema -
Collect all objects which can be referenced in the
2.2.0
schema -
Check that this references for
2.0.0
schema are correct
val possibleReferencesLocation = mapOf(
AsyncAPISchemaIndex.channels to setOf("\$.channels.*.\$ref"),
AsyncAPISchemaIndex.parameters to setOf(
"\$.channels.*.parameters.*.\$ref",
"\$.components.parameters.*.\$ref"
),
AsyncAPISchemaIndex.traits to setOf(
"\$.channels.*.subscribe.traits.*.\$ref",
"\$.channels.*.publish.traits.*.\$ref",
"\$.components.messages.*.traits.*.\$ref"
),
AsyncAPISchemaIndex.messages to setOf(
"\$.channels.*.subscribe.message.\$ref",
"\$.channels.*.publish.message.\$ref",
"\$.components.messages.*.\$ref"
),
AsyncAPISchemaIndex.schemas to setOf("\$.components.schemas.*.\$ref"),
AsyncAPISchemaIndex.securitySchemes to setOf("\$.components.securitySchemes.*.\$ref"),
AsyncAPISchemaIndex.correlationIds to setOf(
"\$.components.messages.*.correlationId.\$ref",
"\$.components.messages.*.traits.*.correlationId.\$ref"
),
AsyncAPISchemaIndex.headers to setOf(
"\$.components.messages.*.headers.\$ref",
"\$.components.messages.*.traits.*.headers.\$ref"
)
)
Second step:
-
Generate JsonSchema per object which can be referenced in the
2.0.0
specification -
Generate JsonSchema per object which can be referenced in the
2.1.0
specification -
Generate JsonSchema per object which can be referenced in the
2.2.0
specification
Third step:
-
Check that plugin collects referenced objects correctly for
2.0.0
-
Collect referenced objects for
2.1.0
-
Collect referenced objects for
2.2.0
Fourth step:
- Validate referenced object by their type
Hi @Pakisan if work for this issue is still planned, I suggest moving it to https://github.com/asyncapi/jasyncapi-idea-plugin
OTOH if this is completed -- or this issue will not be worked on -- I suggest closing this issue.
Moved to asyncapi/jasyncapi-idea-plugin#18