Skip to content

Commit

Permalink
Fix open-metadata#12898: Support custom properties for Glossary and G…
Browse files Browse the repository at this point in the history
…lossary Term (open-metadata#13125)
  • Loading branch information
harshach authored Sep 12, 2023
1 parent 1af4941 commit 90d1e87
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
@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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
@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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down Expand Up @@ -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"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 90d1e87

Please sign in to comment.