Skip to content

Commit

Permalink
feat(element-templates): support metadata with keywords
Browse files Browse the repository at this point in the history
Related to #3089
  • Loading branch information
philippfromme committed Oct 8, 2024
1 parent 97c0e45 commit 0ca0f3a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"name",
"id",
"description",
"metadata",
"documentationRef",
"version",
"category",
Expand All @@ -46,6 +47,7 @@ public record ElementTemplate(
int version,
String documentationRef,
String description,
Metadata metadata,
Set<String> appliesTo,
ElementTypeWrapper elementType,
List<PropertyGroup> groups,
Expand Down Expand Up @@ -117,6 +119,22 @@ public String schema() {
return SCHEMA_URL;
}

public static class Metadata {
List<String> keywords;

public Metadata(List<String> keywords) {
this.keywords = keywords;
}

public List<String> getKeywords() {
return keywords;
}

public void setKeywords(List<String> keywords) {
this.keywords = keywords;
}
}

@JsonInclude(Include.NON_NULL)
public record ElementTypeWrapper(
String value, String eventDefinition, @JsonIgnore BpmnType originalType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ void serializationTest() throws Exception {
.documentationRef(
"https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/available-connectors-overview/")
.description("Describe this connector")
.metadata(
Metadata.builder()
.keywords(List.of("keyword1", "keyword2"))
.build())
.propertyGroups(
PropertyGroup.builder()
.id("authentication")
Expand Down

0 comments on commit 0ca0f3a

Please sign in to comment.