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

Catalog: expose an API for consuming connectors catalog metadata and options #548

Merged
merged 3 commits into from Oct 9, 2020

Conversation

oscerd
Copy link
Contributor

@oscerd oscerd commented Oct 9, 2020

Fixes #542

@oscerd oscerd merged commit c792fd5 into master Oct 9, 2020
@oscerd oscerd deleted the issue-542 branch October 9, 2020 07:32
return connectorsName;
}

public static Map<String, CamelKafkaConnectorModel> getConnectorsModel() {
Copy link
Contributor

Choose a reason for hiding this comment

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

why this method is static?

If accessed before an instanciation of the class happened, it will return an empty value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a mistake.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I will provide a PR to remove the static

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's already done and merged

public String getConnectorAsJson(String connectorName) {
String result = null;
try {
result = Files.lines(Paths.get(CONNECTORS_DIR + File.separator + connectorName + ".json")).parallel() // for
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that accessing this way doesn't work with a bundled jar. It is working only in development mode with an exploded folder. Next to use some getResourceAsStream methods

I will have a look to provide PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can also use the catalog helper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From core catalog.

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.

Catalog: expose an API for consuming connectors catalog metadata and options
2 participants