From 76bd3d2ba4ac6942afb869ebf9c2a8410ba30502 Mon Sep 17 00:00:00 2001 From: Ayush Shah Date: Tue, 12 Aug 2025 10:09:43 +0530 Subject: [PATCH] Enhance TypeResource API documentation to clarify custom property definitions. Updated descriptions for managing custom properties and creating property templates using existing OpenMetadata data types. (#22883) --- .../service/resources/types/TypeResource.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/types/TypeResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/types/TypeResource.java index 5ff57928f65..4af6d370fd1 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/types/TypeResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/types/TypeResource.java @@ -76,8 +76,10 @@ import org.openmetadata.service.util.SchemaFieldExtractor; @Tag( name = "Metadata", description = - "These APIs are for adding new `Types` to OpenMetadata and use those `Types` to " - + "extend the metadata of an entity with custom properties.") + "These APIs are for managing custom property definitions in OpenMetadata. Use these APIs to " + + "create custom properties with predefined data types (String, Integer, Date, etc.) that " + + "extend entity metadata. Note: This does not support creating new custom data types - " + + "only custom properties using existing OpenMetadata data types.") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Collection(name = "types") @@ -311,12 +313,17 @@ public class TypeResource extends EntityResource { @POST @Operation( operationId = "createType", - summary = "Create a type", - description = "Create a new type.", + summary = "Create a custom property definition", + description = + "Create a new custom property definition that can be applied to entities. " + + "This creates a property template using existing OpenMetadata data types " + + "(String, Integer, Date, Enum, etc.). The created property can then be used to " + + "extend metadata for data assets like tables, dashboards, and pipelines. " + + "Note: This does not create new data types - only custom property definitions.", responses = { @ApiResponse( responseCode = "200", - description = "The type", + description = "The custom property definition", content = @Content( mediaType = "application/json",