Fix #12898: Support custom properties for Glossary and Glossary Term (#13125)

This commit is contained in:
Sriharsha Chintalapani 2023-09-12 11:45:55 -07:00 committed by GitHub
parent 1af4941797
commit 90d1e87cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 2 deletions

View File

@ -72,7 +72,7 @@ import org.openmetadata.service.util.ResultList;
@Collection(name = "glossaries", order = 6) // Initialize before GlossaryTerm and after Classification and Tags
public class GlossaryResource extends EntityResource<Glossary, GlossaryRepository> {
public static final String COLLECTION_PATH = "v1/glossaries/";
static final String FIELDS = "owner,tags,reviewers,usageCount,termCount,domain";
static final String FIELDS = "owner,tags,reviewers,usageCount,termCount,domain,extension";
public GlossaryResource(CollectionDAO dao, Authorizer authorizer) {
super(Glossary.class, new GlossaryRepository(dao), authorizer);

View File

@ -73,7 +73,7 @@ import org.openmetadata.service.util.ResultList;
@Collection(name = "glossaryTerms", order = 7) // Initialized after Glossary, Classification, and Tags
public class GlossaryTermResource extends EntityResource<GlossaryTerm, GlossaryTermRepository> {
public static final String COLLECTION_PATH = "v1/glossaryTerms/";
static final String FIELDS = "children,relatedTerms,reviewers,owner,tags,usageCount,domain";
static final String FIELDS = "children,relatedTerms,reviewers,owner,tags,usageCount,domain,extension";
@Override
public GlossaryTerm addHref(UriInfo uriInfo, GlossaryTerm term) {

View File

@ -50,6 +50,10 @@
"domain" : {
"description": "Fully qualified name of the domain the Glossary belongs to.",
"type": "string"
},
"extension": {
"description": "Entity extension data with custom attributes added to the entity.",
"$ref": "../../type/basic.json#/definitions/entityExtension"
}
},
"required": ["name", "description"],

View File

@ -75,6 +75,10 @@
"description" : "Glossary terms that are children of this term are mutually exclusive. When mutually exclusive is `true` only one term can be used to label an entity from this group. When mutually exclusive is `false`, multiple terms from this group can be used to label an entity.",
"type" : "boolean",
"default" : "false"
},
"extension": {
"description": "Entity extension data with custom attributes added to the entity.",
"$ref": "../../type/basic.json#/definitions/entityExtension"
}
},
"required": ["glossary", "name", "description"],

View File

@ -3,6 +3,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Glossary",
"description": "This schema defines the Glossary entity. A Glossary is collection of hierarchical GlossaryTerms.",
"$comment": "@om-entity-type",
"type": "object",
"javaType": "org.openmetadata.schema.entity.data.Glossary",
"javaInterfaces": ["org.openmetadata.schema.EntityInterface"],
@ -98,6 +99,10 @@
},
"votes" : {
"$ref": "../../type/votes.json"
},
"extension": {
"description": "Entity extension data with custom attributes added to the entity.",
"$ref": "../../type/basic.json#/definitions/entityExtension"
}
},
"required": ["id", "name", "description"],

View File

@ -3,6 +3,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "GlossaryTerm",
"description": "This schema defines te Glossary term entities.",
"$comment": "@om-entity-type",
"type": "object",
"javaType": "org.openmetadata.schema.entity.data.GlossaryTerm",
"javaInterfaces": ["org.openmetadata.schema.EntityInterface"],
@ -140,6 +141,10 @@
"type" : "boolean",
"default" : "false"
},
"extension": {
"description": "Entity extension data with custom attributes added to the entity.",
"$ref": "../../type/basic.json#/definitions/entityExtension"
},
"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"