-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Unable to send message with glee when payload is an object with an allOf of two or more objects #720
Comments
@dankar, I think I spotted the issue in your schema. The problem is with using
Your schemas are fighting each other in a paradox. Change Let me know if that works! 😊 |
@KhudaDad414 Thank you for your answer. I'm then a bit unsure of how to specify what I want: I do want the message to contain all of those objects, but absolutely nothing else. Is it then not possible to specify that? |
I guess the best bet would be to combine your schemas into one schema. something like: {
"additionalProperties": false,
"title": "setParamResult",
"type": "object",
"required": [
"id",
"valueString"
],
"properties": {
"id": {
"type": "string"
},
"valueString": {
"type": "string"
}
}
} if this is not a choice then I am not exactly sure if it's possible with |
I would think that it's against the purpose of using these kinds of tools. I want to be able to reuse objects as much as possible, instead of implementing them over and over. These examples were simple, but in reality I have numerous big objects that are used tens of times in different messages. The only caveat in this case is that I want to have the message fully defined, and not allow any additional properties in any part of it. But of course, it's up to you, I just thought I should report it :) |
@dankar, you are correct. this is a limitation. but since we are using JSON Schema there is nothing we can do to address this issue. you can open an issue in the JSON Schema and if they change things things are going to work here automatically. |
Describe the bug
I have a message and it's payload consists of an object that is composed of an allOf with two objects in it. When I try to send this message it fails validation, even though I think it's correct. If the allOf only contains one object it works as expected.
Funnily enough, if I try to send an empty object as message, it complains about the missing keys. But if I add them I get the error message described.
How to Reproduce
I have this API spec:
And this is the code in a lifecycle file:
This is the error I get:
Expected behavior
I'm fairly sure I shouldn't be getting any errors.
The text was updated successfully, but these errors were encountered: