Skip to content
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

Merged
merged 2 commits into from Mar 17, 2022

Conversation

christophd
Copy link
Contributor

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).

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).
Copy link
Contributor

@oscerd oscerd left a 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 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add license?

Copy link
Contributor Author

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:
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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?

@oscerd oscerd merged commit 1d0499d into apache:main Mar 17, 2022
@oscerd
Copy link
Contributor

oscerd commented Mar 17, 2022

Thanks @christophd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants