Closed jaydeepk closed 7 months ago
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.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Hello, just want to add that I had a look at the code and there is this comment on that the 'Items' property can either be a json schema or an array of schemas. If items is an array of schemas, one option would be to define it in the 'prefixItems' property:
{
"type": "array",
"prefixItems": [
{ "type": "number" },
{ "type": "string" },
{ "enum": ["Street", "Avenue", "Boulevard"] },
{ "enum": ["NW", "NE", "SW", "SE"] }
]
}
as described here: https://json-schema.org/understanding-json-schema/reference/array.html
So we could either use the 'prefixItems' property ..or the other option would be to set the 'items' property as a list of schemas? Please let me know your thoughts on this.
Thanks a lot for this project. Appreciate it very much. However lack of array support is a blocker for us. Can you please help by prioritising the same and if you could please review the PR?
@jaydeepk @harikrishnan83 sorry for late response. I reviewed your PR now and it looks fine, for first view.
I'm not sure that selected key word is actual for JSON Schema draft 7. Will check it tomorrow
@Pakisan thanks for taking a look.
Thanks for the update @Pakisan, no worries ! Please let us know if any changes are required.
Hello, just want to add that I had a look at the code and there is this comment on that the 'Items' property can either be a json schema or an array of schemas. If items is an array of schemas, one option would be to define it in the 'prefixItems' property:
{ "type": "array", "prefixItems": [ { "type": "number" }, { "type": "string" }, { "enum": ["Street", "Avenue", "Boulevard"] }, { "enum": ["NW", "NE", "SW", "SE"] } ] }
as described here: https://json-schema.org/understanding-json-schema/reference/array.html
So we could either use the 'prefixItems' property ..or the other option would be to set the 'items' property as a list of schemas? Please let me know your thoughts on this.
I think that we can't use prefixItems
because it was introduced in 2020-12
Array-value "items" functionality is now "prefixItems"
In Draft 4 - 2019-09, tuple validation was handled by an alternate form of the items keyword. When items was an array of schemas instead of a single schema, it behaved the way prefixItems behaves.
So let's don't add prefixItems
into Schema
@harikrishnan83 @harikrishnan83 Hi!
If everything works fine, I propose to close this issue.
If you are using library in project inside open repo, you can attach link to it. It will allow me to notify you about new release o propose MR with bumped version of library
@Pakisan Can you please share in what release we can expect the changes so that we can test and confirm with that release version? BTW we extensively use Dependabot, so we should receive a dependency version bump PR for this. cc @jaydeepk
@Pakisan Can you please share in what release we can expect the changes so that we can test and confirm with that release version? BTW we extensively use Dependabot, so we should receive a dependency version bump PR for this. cc @jaydeepk
In think it will be end of December, cause on 6 of December will be release of new version of our spec and I need time to refactor things
Thanks @Pakisan, looking forward to the release. cc @jaydeepk
Hi We are experiencing some issues with parsing specs where messages are defined as an array of objects. Let's say I have this spec:
When I parse this schema, the 'items' property appears as a LinkedHashMap. Ideally, we'd expect this to be a Schema object. Also in this map, 'properties is again a <String, LinkedHashMap> instead of <String, Schema> ( like we see it for a payload of type="object")
Could you please advise if my understanding is correct and if this is something that you plan to fix at some point ?