-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat(sourcecode): Serialize URI string #900
Conversation
b2cee2b
to
7429699
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7429699
to
374dd63
Compare
Awesome, thanks @apupier for catching it, I pushed a fix for a related issue |
374dd63
to
cbb3263
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for rest-openapi, the path parameters are still written as attributes:
- route:
id: route-4144
from:
id: from-1532
uri: timer
parameters:
period: "1000"
timerName: template
steps:
- log:
id: log-3429
message: template message
- to:
id: to-1027
uri: rest-openapi
parameters:
operationId: myOperation
specificationUri: afile-openapi.json
eeb767c
to
b7363c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- reported issues fixed
- not spotted new ones
- seems all cases covered by automates test cases
Thanks for the @apupier, but now I think I spotted something else that I think it would be better to fix. As an example, the At this moment, when serializing the URI, if the
I think it's not ideal, as it would be preferable to ignore the last This will require a bit more love since we would need to check the upcoming parameters as well, considering that for multiple optional parameters, we could provide just the last one, in which case, we would need to serialize the entire URI up to the last parameter 🙀 |
Currently, only the component name gets serialized into the URI string, the remaining parameters ar serialized in the parameters dictionary as follows: ```yaml - from: uri: timer parameters: period: "1000" timerName: template ``` While this works for the Camel CLI, CamelK doesn't support this schema at the moment, causing the deployment to fail. This commit write the path parameters into the URI string, in order to support CamelK deployments, f.i.: ```yaml - from: uri: timer:template parameters: period: "1000" ``` fixes: KaotoIO#884
b7363c4
to
c42542e
Compare
Af this update, the optional parameters are only written if the next value is either required or provided. |
Context
Currently, only the component name gets serialized into the URI string, the remaining parameters ar serialized in the parameters dictionary as follows:
While this works for the Camel CLI, CamelK doesn't support this schema at the moment, causing the deployment to fail.
This commit writes the path parameters into the URI string, in order to support CamelK deployments, f.i.:
fixes: #884