diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java index b69de36170e..a9fcfa37a58 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java @@ -244,6 +244,10 @@ public abstract class EntityRepository { this.putFields.addField(allowedFields, FIELD_EXTENSION); } this.supportsVotes = allowedFields.contains(FIELD_VOTES); + if (supportsVotes) { + this.patchFields.addField(allowedFields, FIELD_VOTES); + this.putFields.addField(allowedFields, FIELD_VOTES); + } this.supportsDomain = allowedFields.contains(FIELD_DOMAIN); if (supportsDomain) { this.patchFields.addField(allowedFields, FIELD_DOMAIN); @@ -670,6 +674,7 @@ public abstract class EntityRepository { entity.setChildren(fields.contains(FIELD_CHILDREN) ? getChildren(entity) : entity.getChildren()); entity.setExperts(fields.contains(FIELD_EXPERTS) ? getExperts(entity) : entity.getExperts()); entity.setReviewers(fields.contains(FIELD_REVIEWERS) ? getReviewers(entity) : entity.getReviewers()); + entity.setVotes(fields.contains(FIELD_VOTES) ? getVotes(entity) : entity.getVotes()); setFields(entity, fields); return entity; } @@ -684,6 +689,7 @@ public abstract class EntityRepository { entity.setChildren(fields.contains(FIELD_CHILDREN) ? entity.getChildren() : null); entity.setExperts(fields.contains(FIELD_EXPERTS) ? entity.getExperts() : null); entity.setReviewers(fields.contains(FIELD_REVIEWERS) ? entity.getReviewers() : null); + entity.setVotes(fields.contains(FIELD_VOTES) ? entity.getVotes() : null); clearFields(entity, fields); return entity; } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/QueryRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/QueryRepository.java index 3763c12dbeb..bcca2941f5d 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/QueryRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/QueryRepository.java @@ -27,10 +27,9 @@ import org.openmetadata.service.util.RestUtil; public class QueryRepository extends EntityRepository { private static final String QUERY_USED_IN_FIELD = "queryUsedIn"; - private static final String QUERY_USERS_FIELD = "users"; private static final String QUERY_PATCH_FIELDS = "users,query,queryUsedIn"; - private static final String QUERY_UPDATE_FIELDS = "users,votes,queryUsedIn"; + private static final String QUERY_UPDATE_FIELDS = "users,queryUsedIn"; public QueryRepository(CollectionDAO dao) { super( @@ -45,14 +44,12 @@ public class QueryRepository extends EntityRepository { @Override public Query setFields(Query entity, EntityUtil.Fields fields) { - entity.setVotes(fields.contains("votes") ? getVotes(entity) : entity.getVotes()); entity.setQueryUsedIn(fields.contains(QUERY_USED_IN_FIELD) ? getQueryUsage(entity) : entity.getQueryUsedIn()); return entity.withUsers(fields.contains("users") ? getQueryUsers(entity) : entity.getUsers()); } @Override public Query clearFields(Query entity, EntityUtil.Fields fields) { - entity.withVotes(fields.contains("votes") ? entity.getVotes() : null); entity.withQueryUsedIn(fields.contains(QUERY_USED_IN_FIELD) ? entity.getQueryUsedIn() : null); return entity.withUsers(fields.contains("users") ? this.getQueryUsers(entity) : null); } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/EntityResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/EntityResource.java index d601789aff8..88a9bfa02e4 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/EntityResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/EntityResource.java @@ -59,7 +59,7 @@ public abstract class EntityResource { return deleteByName(uriInfo, securityContext, fqn, false, hardDelete); } + @PUT + @Path("/{id}/vote") + @Operation( + operationId = "updateVoteForEntity", + summary = "Update Vote for a Entity", + description = "Update vote for a Entity", + responses = { + @ApiResponse( + responseCode = "200", + description = "OK", + content = @Content(mediaType = "application/json", schema = @Schema(implementation = ChangeEvent.class))), + @ApiResponse(responseCode = "404", description = "model for instance {id} is not found") + }) + public Response updateVote( + @Context UriInfo uriInfo, + @Context SecurityContext securityContext, + @Parameter(description = "Id of the Entity", schema = @Schema(type = "UUID")) @PathParam("id") UUID id, + @Valid VoteRequest request) { + return repository.updateVote(securityContext.getUserPrincipal().getName(), id, request).toResponse(); + } + @PUT @Path("/restore") @Operation( diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/dashboards/DashboardResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/dashboards/DashboardResource.java index 559bb364893..c7651307394 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/dashboards/DashboardResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/dashboards/DashboardResource.java @@ -46,9 +46,11 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.UriInfo; +import org.openmetadata.schema.api.VoteRequest; import org.openmetadata.schema.api.data.CreateDashboard; import org.openmetadata.schema.api.data.RestoreEntity; import org.openmetadata.schema.entity.data.Dashboard; +import org.openmetadata.schema.type.ChangeEvent; import org.openmetadata.schema.type.EntityHistory; import org.openmetadata.schema.type.Include; import org.openmetadata.schema.type.MetadataOperation; @@ -353,6 +355,27 @@ public class DashboardResource extends EntityResource { return addHref(uriInfo, table); } + @PUT + @Path("/{id}/vote") + @Operation( + operationId = "updateVoteForEntity", + summary = "Update Vote for a Entity", + description = "Update vote for a Entity", + responses = { + @ApiResponse( + responseCode = "200", + description = "OK", + content = @Content(mediaType = "application/json", schema = @Schema(implementation = ChangeEvent.class))), + @ApiResponse(responseCode = "404", description = "model for instance {id} is not found") + }) + public Response updateVote( + @Context UriInfo uriInfo, + @Context SecurityContext securityContext, + @Parameter(description = "Id of the Entity", schema = @Schema(type = "UUID")) @PathParam("id") UUID id, + @Valid VoteRequest request) { + return repository.updateVote(securityContext.getUserPrincipal().getName(), id, request).toResponse(); + } + @DELETE @Path("/{id}/customMetric/{columnName}/{customMetricName}") @Operation( diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/datamodels/DashboardDataModelResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/datamodels/DashboardDataModelResource.java index ed2c34c33c7..88992431c53 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/datamodels/DashboardDataModelResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/datamodels/DashboardDataModelResource.java @@ -43,9 +43,11 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.UriInfo; +import org.openmetadata.schema.api.VoteRequest; import org.openmetadata.schema.api.data.CreateDashboardDataModel; import org.openmetadata.schema.api.data.RestoreEntity; import org.openmetadata.schema.entity.data.DashboardDataModel; +import org.openmetadata.schema.type.ChangeEvent; import org.openmetadata.schema.type.EntityHistory; import org.openmetadata.schema.type.Include; import org.openmetadata.service.Entity; @@ -353,6 +355,27 @@ public class DashboardDataModelResource extends EntityResource return super.create(uriInfo, securityContext, metrics); } + @PUT + @Path("/{id}/vote") + @Operation( + operationId = "updateVoteForEntity", + summary = "Update Vote for a Entity", + description = "Update vote for a Entity", + responses = { + @ApiResponse( + responseCode = "200", + description = "OK", + content = @Content(mediaType = "application/json", schema = @Schema(implementation = ChangeEvent.class))), + @ApiResponse(responseCode = "404", description = "model for instance {id} is not found") + }) + public Response updateVote( + @Context UriInfo uriInfo, + @Context SecurityContext securityContext, + @Parameter(description = "Id of the Entity", schema = @Schema(type = "UUID")) @PathParam("id") UUID id, + @Valid VoteRequest request) { + return repository.updateVote(securityContext.getUserPrincipal().getName(), id, request).toResponse(); + } + @Override @PUT @Operation( diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/query/QueryResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/query/QueryResource.java index e9ec662a310..d85aaabcd63 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/query/QueryResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/query/QueryResource.java @@ -72,7 +72,7 @@ public class QueryResource extends EntityResource { @Override protected List getEntitySpecificOperations() { - addViewOperation("users,votes,queryUsedIn", MetadataOperation.VIEW_BASIC); + addViewOperation("users,queryUsedIn", MetadataOperation.VIEW_BASIC); return null; } @@ -321,9 +321,9 @@ public class QueryResource extends EntityResource { @PUT @Path("/{id}/vote") @Operation( - operationId = "updateVote", - summary = "Update Vote for a query", - description = "Update vote for a query", + operationId = "updateVoteForEntity", + summary = "Update Vote for a Entity", + description = "Update vote for a Entity", responses = { @ApiResponse( responseCode = "200", @@ -334,7 +334,7 @@ public class QueryResource extends EntityResource { public Response updateVote( @Context UriInfo uriInfo, @Context SecurityContext securityContext, - @Parameter(description = "Id of the Query", schema = @Schema(type = "UUID")) @PathParam("id") UUID id, + @Parameter(description = "Id of the Entity", schema = @Schema(type = "UUID")) @PathParam("id") UUID id, @Valid VoteRequest request) { return repository.updateVote(securityContext.getUserPrincipal().getName(), id, request).toResponse(); } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/reports/ReportResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/reports/ReportResource.java index 3d6d3c33901..8613b4bc631 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/reports/ReportResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/reports/ReportResource.java @@ -39,7 +39,9 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.UriInfo; +import org.openmetadata.schema.api.VoteRequest; import org.openmetadata.schema.entity.data.Report; +import org.openmetadata.schema.type.ChangeEvent; import org.openmetadata.schema.type.Include; import org.openmetadata.schema.type.MetadataOperation; import org.openmetadata.service.jdbi3.CollectionDAO; @@ -170,6 +172,27 @@ public class ReportResource extends EntityResource { return super.createOrUpdate(uriInfo, securityContext, report); } + @PUT + @Path("/{id}/vote") + @Operation( + operationId = "updateVoteForEntity", + summary = "Update Vote for a Entity", + description = "Update vote for a Entity", + responses = { + @ApiResponse( + responseCode = "200", + description = "OK", + content = @Content(mediaType = "application/json", schema = @Schema(implementation = ChangeEvent.class))), + @ApiResponse(responseCode = "404", description = "model for instance {id} is not found") + }) + public Response updateVote( + @Context UriInfo uriInfo, + @Context SecurityContext securityContext, + @Parameter(description = "Id of the Entity", schema = @Schema(type = "UUID")) @PathParam("id") UUID id, + @Valid VoteRequest request) { + return repository.updateVote(securityContext.getUserPrincipal().getName(), id, request).toResponse(); + } + private void addToReport(SecurityContext securityContext, Report report) { report .withId(UUID.randomUUID()) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/searchindex/SearchIndexResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/searchindex/SearchIndexResource.java index 45ab3fcb2e2..bad17312730 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/searchindex/SearchIndexResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/searchindex/SearchIndexResource.java @@ -46,6 +46,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.UriInfo; +import org.openmetadata.schema.api.VoteRequest; import org.openmetadata.schema.api.data.CreateSearchIndex; import org.openmetadata.schema.api.data.RestoreEntity; import org.openmetadata.schema.entity.data.SearchIndex; @@ -407,6 +408,27 @@ public class SearchIndexResource extends EntityResource { .toResponse(); } + @PUT + @Path("/{id}/vote") + @Operation( + operationId = "updateVoteForEntity", + summary = "Update Vote for a Entity", + description = "Update vote for a Entity", + responses = { + @ApiResponse( + responseCode = "200", + description = "OK", + content = @Content(mediaType = "application/json", schema = @Schema(implementation = ChangeEvent.class))), + @ApiResponse(responseCode = "404", description = "model for instance {id} is not found") + }) + public Response updateVote( + @Context UriInfo uriInfo, + @Context SecurityContext securityContext, + @Parameter(description = "Id of the Entity", schema = @Schema(type = "UUID")) @PathParam("id") UUID id, + @Valid VoteRequest request) { + return repository.updateVote(securityContext.getUserPrincipal().getName(), id, request).toResponse(); + } + @DELETE @Path("/{id}") @Operation( diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java index 7d35b7af719..6e7ec26d684 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java @@ -39,6 +39,7 @@ import static org.openmetadata.service.Entity.FIELD_EXTENSION; import static org.openmetadata.service.Entity.FIELD_FOLLOWERS; import static org.openmetadata.service.Entity.FIELD_OWNER; import static org.openmetadata.service.Entity.FIELD_TAGS; +import static org.openmetadata.service.Entity.FIELD_VOTES; import static org.openmetadata.service.exception.CatalogExceptionMessage.ENTITY_ALREADY_EXISTS; import static org.openmetadata.service.exception.CatalogExceptionMessage.entityIsNotEmpty; import static org.openmetadata.service.exception.CatalogExceptionMessage.entityNotFound; @@ -224,6 +225,7 @@ public abstract class EntityResourceTest allowedFields = Entity.getEntityFields(entityClass); this.supportsEmptyDescription = !EntityUtil.isDescriptionRequired(entityClass); this.supportsFollowers = allowedFields.contains(FIELD_FOLLOWERS); + this.supportsVotes = allowedFields.contains(FIELD_VOTES); this.supportsOwner = allowedFields.contains(FIELD_OWNER); this.supportsTags = allowedFields.contains(FIELD_TAGS); this.supportsSoftDelete = allowedFields.contains(FIELD_DELETED); diff --git a/openmetadata-spec/src/main/java/org/openmetadata/schema/EntityInterface.java b/openmetadata-spec/src/main/java/org/openmetadata/schema/EntityInterface.java index 158cc84b334..9b2402dcb66 100644 --- a/openmetadata-spec/src/main/java/org/openmetadata/schema/EntityInterface.java +++ b/openmetadata-spec/src/main/java/org/openmetadata/schema/EntityInterface.java @@ -160,6 +160,10 @@ public interface EntityInterface { /* no-op implementation to be overridden */ } + default void setVotes(Votes vote) { + /* no-op implementation to be overridden */ + } + T withHref(URI href); @JsonIgnore diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/chart.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/chart.json index 6731a5f63dc..e5ce1d5058f 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/chart.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/chart.json @@ -147,6 +147,9 @@ "description": "List of data products this entity is part of.", "$ref" : "../../type/entityReferenceList.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/container.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/container.json index d293eb705b3..0d22a43971b 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/container.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/container.json @@ -176,6 +176,9 @@ "description": "Domain the Container belongs to. When not set, the Container inherits the domain from the storage service it belongs to.", "$ref": "../../type/entityReference.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboard.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboard.json index 6a52585d0a8..0fd37f9e78e 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboard.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboard.json @@ -135,6 +135,9 @@ "description": "List of data products this entity is part of.", "$ref" : "../../type/entityReferenceList.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboardDataModel.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboardDataModel.json index 6208a75b612..bc8371ecf74 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboardDataModel.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboardDataModel.json @@ -142,6 +142,9 @@ "description": "Domain the Dashboard Data Model belongs to. When not set, the Dashboard model inherits the domain from the dashboard service it belongs to.", "$ref": "../../type/entityReference.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/database.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/database.json index 5afc2b6c1de..88ceffd66fe 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/database.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/database.json @@ -116,6 +116,9 @@ "description": "Domain the Database belongs to. When not set, the Database inherits the domain from the database service it belongs to.", "$ref": "../../type/entityReference.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/databaseSchema.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/databaseSchema.json index f501f1ec85d..df390432fbe 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/databaseSchema.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/databaseSchema.json @@ -111,6 +111,9 @@ "description": "Domain the Database Schema belongs to. When not set, the Schema inherits the domain from the database it belongs to.", "$ref": "../../type/entityReference.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/glossary.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/glossary.json index 05d94253b31..476e38fa74e 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/glossary.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/glossary.json @@ -95,6 +95,9 @@ "domain" : { "description": "Domain the Glossary belongs to.", "$ref": "../../type/entityReference.json" + }, + "votes" : { + "$ref": "../../type/votes.json" } }, "required": ["id", "name", "description"], diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/glossaryTerm.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/glossaryTerm.json index c503130b869..314826ffbaa 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/glossaryTerm.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/glossaryTerm.json @@ -143,6 +143,9 @@ "domain" : { "description": "Domain the Glossary Term belongs to. When not set, the Glossary TErm inherits the domain from the Glossary it belongs to.", "$ref": "../../type/entityReference.json" + }, + "votes" : { + "$ref": "../../type/votes.json" } }, "required": ["id", "name", "description", "glossary"], diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/metrics.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/metrics.json index b4daba9af04..70865ce88ff 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/metrics.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/metrics.json @@ -76,6 +76,9 @@ "domain" : { "description": "Domain the Metrics belongs to.", "$ref": "../../type/entityReference.json" + }, + "votes" : { + "$ref": "../../type/votes.json" } }, "required": ["id", "name", "service"], diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/mlmodel.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/mlmodel.json index 68f7b68a15d..5fdfd3b742a 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/mlmodel.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/mlmodel.json @@ -273,11 +273,13 @@ "description": "Domain the MLModel belongs to. When not set, the MLModel inherits the domain from the ML Model Service it belongs to.", "$ref": "../../type/entityReference.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" } - }, "required": ["id", "name", "algorithm", "service"], "additionalProperties": false diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json index 116c68ce58e..4460f772710 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json @@ -259,6 +259,9 @@ "description": "Domain the Pipeline belongs to. When not set, the pipeline inherits the domain from the Pipeline service it belongs to.", "$ref": "../../type/entityReference.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/report.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/report.json index d60922bd4f1..2fffc9df75c 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/report.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/report.json @@ -64,6 +64,9 @@ "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", "default": false + }, + "votes" : { + "$ref": "../../type/votes.json" } }, "required": ["id", "name", "service"], diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/searchIndex.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/searchIndex.json index 9da2bdd2a75..98f0c0f7527 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/searchIndex.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/searchIndex.json @@ -226,6 +226,9 @@ "dataProducts" : { "description": "List of data products this entity is part of.", "$ref" : "../../type/entityReferenceList.json" + }, + "votes" : { + "$ref": "../../type/votes.json" } }, "required": ["id", "name", "service", "fields"], diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json index ee0d464882a..61a80f8f61b 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json @@ -1033,6 +1033,9 @@ "description": "File format in case of file/datalake tables.", "$ref" : "#/definitions/fileFormat" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/topic.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/topic.json index 40d655bd189..3645a3391c5 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/topic.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/topic.json @@ -166,6 +166,9 @@ "description": "List of data products this entity is part of.", "$ref" : "../../type/entityReferenceList.json" }, + "votes" : { + "$ref": "../../type/votes.json" + }, "lifeCycle": { "description": "Life Cycle properties of the entity", "$ref": "../../type/lifeCycle.json"