Skip to content

Commit

Permalink
Added a Catalog Method showing the supported headers (specific for co…
Browse files Browse the repository at this point in the history
…nsumer, producer and common) for a Kamelet - Webhook, Websocket and Wttrin

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
  • Loading branch information
oscerd committed Oct 20, 2022
1 parent 25d5a13 commit 6c61b44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public enum KameletPrefixSchemeEnum {
timer("timer", "timer"),
twitter_directmessage("twitter-directmessage", "twitter-directmessage"),
twitter_timeline("twitter-timeline", "twitter-timeline"),
twitter_search("twitter-search", "twitter-search"),;
twitter_search("twitter-search", "twitter-search"),
webhook("webhook", "platform-http"),
websocket("websocket", "websocket"),
wttrin("wttrin", "https");

public final String name;
public final String scheme;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,5 +366,11 @@ void testSupportedHeaders() throws Exception {
assertEquals(1, headersTwitterTimelineSource.size());
List<ComponentModel.EndpointHeaderModel> headersTwitterSearchSource= catalog.getKameletSupportedHeaders("twitter-search-source");
assertEquals(7, headersTwitterSearchSource.size());
List<ComponentModel.EndpointHeaderModel> headersWebhookSource= catalog.getKameletSupportedHeaders("webhook-source");
assertEquals(0, headersWebhookSource.size());
List<ComponentModel.EndpointHeaderModel> headersWebsocketSource= catalog.getKameletSupportedHeaders("websocket-source");
assertEquals(4, headersWebsocketSource.size());
List<ComponentModel.EndpointHeaderModel> headersWttrinSource= catalog.getKameletSupportedHeaders("wttrin-source");
assertEquals(5, headersWttrinSource.size());
}
}

0 comments on commit 6c61b44

Please sign in to comment.