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

Adding a new kamelet that uses the nominatim geocoder #982

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

Delawen
Copy link
Contributor

@Delawen Delawen commented Jul 25, 2022

I created this kamelet because I want to use it on a demo next month. It has the geocoder camel component behind.

Given a URL of the geocoder server (Nominatim is FOSS and you can either deploy your own or use an existing one) as header and a text in the body, it searches for the geographic coordinates and the details of the address passed in the body.

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.

Please add the type.

@Delawen
Copy link
Contributor Author

Delawen commented Jul 25, 2022

You mean the output type? I am not sure why the validation is failing, I am defining the objects there.

@oscerd
Copy link
Contributor

oscerd commented Jul 25, 2022

You need to add the type: object to the definition like https://github.com/apache/camel-kamelets/blob/main/kamelets/aws-s3-sink.kamelet.yaml#L46

@Delawen
Copy link
Contributor Author

Delawen commented Jul 25, 2022

Is it not here? (line 59)

Or is types deprecated in favor of singular type?

Edit: I see I deleted the parameters line, maybe that's it.

@Delawen
Copy link
Contributor Author

Delawen commented Jul 25, 2022

I'm trying to mimic https://github.com/apache/camel-kamelets/blob/main/kamelets/salesforce-delete-sink.kamelet.yaml#L77-L87 but maybe I can't have an object inside an object?

@oscerd
Copy link
Contributor

oscerd commented Jul 25, 2022

You need to add type: object in the kamelet definition. Types is a different thing as far as I know.

@Delawen
Copy link
Contributor Author

Delawen commented Jul 25, 2022

I was too smart then. Let's see if that works

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.

The indentation is wrong, type:object should be aligned with required.

@Delawen
Copy link
Contributor Author

Delawen commented Jul 25, 2022

Something else is missing, testing the validation locally now... (which I should have started with)

@Delawen Delawen force-pushed the nominatim branch 2 times, most recently from eed5479 to 097526b Compare July 25, 2022 13:19
@Delawen
Copy link
Contributor Author

Delawen commented Jul 25, 2022

Finally!

For the record: the type: object was missing, but also my schema contained an object inside an object and that was not accepted. As that second object does not always contain the same properties this is a good thing on this specific case.

And my local camel-k installation had no issue with any of those, btw.

@oscerd oscerd merged commit 38fc211 into apache:main Jul 25, 2022
@Delawen Delawen deleted the nominatim branch July 26, 2022 06:06
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

2 participants