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
chore: Add Kamelet rest-openapi-sink #834
Conversation
New Kamelet loads OpenAPI specification from (http/https URL) and calls an operation on the HTTP service. The request is generated respecting the rules given in the OpenAPI specification (e.g. path parameters, Content-Type).
41970a3
to
59a8bf0
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.
LGTM, just minor findings.
@@ -0,0 +1,289 @@ | |||
{ |
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.
Can you add license?
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.
Standard Json does not support comments so it is hard to add the license here. Have added the license headers to other resources though. Thanks for spotting
- operation | ||
type: object | ||
properties: | ||
specification: |
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.
This is good if we run in camel-jbang or camel-kamelet-main, but if we have to deal with camel-k it might be a problem to point a physical file. I mean we should have a volume mounted and containing the specification. In some of the transformation actions, like the templating ones, we are passing a base64 encoded string of this kind of parameters. I think we should harmonize the behavior, but probably we need to change the templating ones and this is good. @davsclaus @lburgazzoli what do you think?
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.
I assume you can use file: or classpath: to refer to a local spec file. And if you use camel-k in container, then you would need to include this file in the built image.
Maybe using runtime resources
https://camel.apache.org/camel-k/1.8.x/configuration/runtime-resources.html
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.
Yes, the rest-openapi Camel component should support both remote and local resources already.
So, I think runtime resources is the way to go as the Camel K operator takes care on making these resources available as local resources in the integration container. Would have to check weather KameletBinding already supports these kind of resources though
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.
Sounds good. So for 0.8.x, I'll change this stuff for the template actions. @lburgazzoli sounds good for you too?
Thanks @christophd |
New Kamelet loads OpenAPI specification from (http/https URL) and calls an operation on the HTTP service. The request is generated respecting the rules given in the OpenAPI specification (e.g. path parameters, Content-Type).