Comments (5)
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 :)
from glee.
@dankar, I think I spotted the issue in your schema. The problem is with using allOf
and setting additionalProperties: false
at the same time. Here's why:
allOf
is strict: WithallOf
, your message has to match both schemas.- No extra properties allowed: That
additionalProperties: false
setting makes things tricky because it means absolutely no other properties can exist.
Your schemas are fighting each other in a paradox.
Change additionalProperties
to true
in one of your schemas. That'll make things a bit more flexible and should fix the error.
Let me know if that works! 😊
from glee.
@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?
from glee.
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 allOf
.
I am closing the issue for now.
from glee.
@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.
All I want to say is there there is nothing that we can do here.
from glee.
Related Issues (20)
- Move `x-remoteServers` Configuration to `glee.config.(js|ts)` HOT 5
- handling request error for websocket connection HOT 1
- Support for Multiple .env Files HOT 4
- Improve Stability in Glee by Handling Message and Connection Failures HOT 3
- Internal nodejs error while running the example app HOT 8
- Apply `default` property to event fields HOT 4
- Update Kafka Adapter to support spec v3 HOT 2
- Improved Error Messaging for Missing Auth Function HOT 4
- Spread syntax requires HOT 2
- but this path is not defined in your AsyncAPI file - Caused by trailing slash HOT 6
- MQTT channel seems to be using wrong topic when sending message HOT 1
- Parameters in channel address not used HOT 3
- Divide "Maintainer" role into two categories: Triager and Committer HOT 3
- [BUG] It does not support non-ssl Kafka Brokers HOT 2
- [BUG] Glee subscribes to topics using channel names instead of "channel.address" (v3) HOT 8
- [FEATURE] Run Glee in a container HOT 2
- [FEATURE] invoke send action for operation in v3 HOT 2
- [FEATURE] Investigate bun if it's right for glee HOT 10
- extract glee-core from glee HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glee.