-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support endpoint DSL in YAML/JSON #366
Comments
For consistency should it be: route:
telegram:
type: bots
chatId: 1234
steps:
- knative:
type: endpoint
name: sink or do you think we should retain the |
Mmh.. that looks ok at first. What I fear is that after it's serialized and read again, we end up with this one, which is less clear: route:
steps:
- knative:
type: endpoint
name: sink
telegram:
type: bots
chatId: 1234 |
fix that damn json encoder/decoder :D |
I can't :D We've introduced the "flow" section in the integration CR, which makes the YAML DSL to belong to the same tree of the custom resource. Then it's no longer under control of our parser. The Kube API server "normalizes" the json putting keys into alphabetical order (that happens for all Kube resources). |
fix that damn kubernetes |
I've hacked something but now the issue is how to integrate it with the yaml dsl schema as the generated json schema is quite big (~ 41700 lines)
I see two options:
I'd personally go for option 1 but we may need some hint from @lhein @apupier |
no idea neither. |
the same name must be used for the property definition and the list of required properties. Camel case name was used for required list and dashed name for definition. Modified to use dashed name always. Signed-off-by: Aurélien Pupier <apupier@redhat.com>
I modified https://github.com/lburgazzoli/apache-camel-k-runtime/blob/github-366/camel-k-loader-yaml/camel-k-loader-yaml/src/generated/resources/camel-yaml-endpoint.json to have a property defined and have it in completion. So created current schema is incorrect for required properties. it is using the camel case name although the dashed name is used for declaring the properties. Provided PR lburgazzoli#2 |
Not yet but I can work on it later today |
the same name must be used for the property definition and the list of required properties. Camel case name was used for required list and dashed name for definition. Modified to use dashed name always. Signed-off-by: Aurélien Pupier <apupier@redhat.com>
Instead of:
We may have (alternative):
It's not only syntactic sugar, the most important part of the syntax below is that it's possible to define the full json/yaml schema of the endpoints, so that a web console or IDE can automatically suggest components and their properties and also completely validate the DSL.
There are tools for IDE that support URI validation, but they need a language server. This would be LSP free.
Maybe we can start moving the DSL to apache camel in order simplify impl.
The text was updated successfully, but these errors were encountered: