-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BUG] Intellij shows error "Missing required property $ref" in AsyncAPI 3.0.0 document #49
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
Will check it today. It may be bug in editor or validator |
@Pakisan confirmed that the asyncapi files to which @timonback provided links both pass validation:
|
@theschles thanks) I have built new version, at night, with updated schema. Will check on todays morning |
@theschles @timonback not easy one problem. Awesome mix of bugs in IDEA related to Need more time to dig into upd: @Souvikns @magicmatatjahu can you help me? |
ok. looks like problem is in it's ok "io.github.springwolf.examples.amqp.dtos.AnotherPayloadDto": {
"headers": {
"$ref": "#/components/schemas/HeadersNotDocumented"
},
"payload": {
"schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0"
},
"name": "io.github.springwolf.examples.amqp.dtos.AnotherPayloadDto",
"title": "AnotherPayloadDto",
"description": "Another payload model",
"bindings": {
"amqp": {
"bindingVersion": "0.3.0"
}
}
}, it's not ok "io.github.springwolf.examples.amqp.dtos.ExamplePayloadDto": {
"headers": {
"$ref": "#/components/schemas/HeadersNotDocumented"
},
"payload": {
"schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0",
"schema": {
"$ref": "#/components/schemas/io.github.springwolf.examples.amqp.dtos.ExamplePayloadDto"
}
},
"name": "io.github.springwolf.examples.amqp.dtos.ExamplePayloadDto",
"title": "ExamplePayloadDto",
"bindings": {
"amqp": {
"bindingVersion": "0.3.0"
}
}
} upd: looks like problem related with reference, cause this is ok: "io.github.springwolf.examples.amqp.dtos.ExamplePayloadDto": {
"headers": {
"$ref": "#/components/schemas/HeadersNotDocumented"
},
"payload": {
"schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0",
"schema": {
"type": "object",
"additionalProperties": false
}
},
"name": "io.github.springwolf.examples.amqp.dtos.ExamplePayloadDto",
"title": "ExamplePayloadDto",
"bindings": {
"amqp": {
"bindingVersion": "0.3.0"
}
}
} upd: I need to ensure that problem appears only with ours schema formats, because it's ok: "io.github.springwolf.examples.amqp.dtos.AnotherPayloadDto": {
"headers": {
"$ref": "#/components/schemas/HeadersNotDocumented"
},
"payload": {
"schemaFormat": "application/vnd.apache.avro;version=1.9.0",
"schema": {
"$ref": "#/components/schemas/io.github.springwolf.examples.amqp.dtos.AnotherPayloadDto"
}
},
"name": "io.github.springwolf.examples.amqp.dtos.AnotherPayloadDto",
"title": "AnotherPayloadDto",
"description": "Another payload model",
"bindings": {
"amqp": {
"bindingVersion": "0.3.0"
}
}
} upd: all
bug is here: https://github.com/asyncapi/spec-json-schemas/blob/master/schemas/3.0.0-without-%24id.json#L2671-L2873 |
…erencing a a json schema Change allOf to anyOf in multiFormatSchema asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
ampq example was fixed sqs on a way |
…erencing a a json schema Fix missing queue definition for SQS channel binding asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a a json schema - Revert changes from auto generated schema - Change allOf to anyOf in multiFormatSchema asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema Include internal definitions from bindings to composed schema asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema fix linter issue asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema Add clarification comment for fix asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
@timonback @theschles both examples were fixed. I'll push updated schemas to release branch. It'll help you to re-check fix after installation of local built plugin |
v2: - 2.0.0 - 2.1.0 - 2.2.0 - 2.3.0 - 2.4.0 - 2.5.0 - 2.6.0 v3: - 3.0.0 asyncapi/spec-json-schemas#494 #49
@timonback @theschles build to test |
Thanks @Pakisan , the I do see the following warnings, not sure if they are expected with the plugin. I am using again https://github.com/springwolf/springwolf-core/blob/master/springwolf-examples/springwolf-sqs-example/src/test/resources/asyncapi.json as it is the smallest file: My Intellij didn't know about AsyncApi3 json-schema yet, so I had to manually define a file |
No, no, no, you don't need to define external json schema. It's already bundled in plugin Download archive and install update manually: plugins -> gear wheel icon -> install from disk |
@theschles please, delete mapping with any schemas, because you are using not fixed schema from https://www.asyncapi.com/schema-store/all.schema-store.json |
Thanks @Pakisan , that does the trick. I don't think - although I might be wrong - that I have touched the default Intellij setting. Anyway, the issue is resolved from my point of view. |
Great to hear, that fix is working like expected. Time to release it)
This trick will not be required after merging of this MR - asyncapi/spec-json-schemas#495. Until that my fix is not available from our side (https://www.asyncapi.com/schema-store/all.schema-store.json) |
> @theschles please, delete mapping with any schemas, because you are using not fixed schema from https://www.asyncapi.com/schema-store/all.schema-store.json>Hi @Pakisan @timonback -- sorry, have been heads down at work all week due to schedule pressure. Now seeing the updates to this convo. I didn't have any specified JSON Schema Mappings at all: |
Hopefully we'll get the remaining approval(s) tomorrow:
Hi @Pakisan - after the spec-json-schemas group approves your PR -- and when you're ready for me to review your plugin code changes -- please ping me through our usual chat system as I might not see the Github notification. |
Just to keep @Pakisan and @timonback in the loop - the reviewer asked for some changes |
…erencing a json schema New multiFormatSchema validation rules asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema New multiFormatSchema validation rules asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema New multiFormatSchema validation rules asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema New multiFormatSchema validation rules asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema New multiFormatSchema validation rules asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema New multiFormatSchema validation rules asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema New multiFormatSchema validation rules asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema New multiFormatSchema validation rules asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema Rollback AnySchema and AvroSchema asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
…erencing a json schema Rollback AnySchema and AvroSchema asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
@Pakisan @timonback was this correctly resolved by the change in |
Thank you @Pakisan and @theschles , the issues are resolved! Looking forward to the official release. |
You can enable now IntelliJ schema store. I think that updated schema was published after merge I hope that release with this fix and 2024.1 will be approved by JetBrains on Monday |
@timonback new version now available for downloading |
Describe the bug.
The provided specs are valid AsyncAPI to the best of our knowledge. The
asyncapi/parser
+ AsyncAPI Studio shows these files as valid.However, the Intellij plugin shows errors
Expected behavior
No errors in the AsyncAPI plugin.
Similar or identical validation to studio.asyncapi.com
Screenshots
How to Reproduce
Open one of the example files in Springwolf, for example:
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
No, someone else can work on it
The text was updated successfully, but these errors were encountered: