Closed sureshms closed 1 year ago
Tasks:
@ShaileshParmar11 the problem is fixed. There are still a lot of build errors because we expect under Classification a children field. This field is no longer supported and we should do similar changes as Glossary to get terms based on list .../tags with filter.
Tags APIs were coded long before other entities' APIs were added. Due to this, tag API does not follow the API convention that all the other entities are following. This issue makes backward incompatible changes to follow the same convention as glossaries.
TagCategory API changes
The name
TagCategory
is changing toClassification
to adopt the more common terminology used in the industry. The API endpoints are changed as follows:GET .../tags
with no paginationGET .../classifications
that includes paginationPOST .../tags
POST .../classifications
GET .../tags/{category}
that includes all the tags in the tag categoryGET .../classifications/name/{category}
. Children are no longer returned in the tag category. Use list tags APIs for this.GET .../classifications/{id}
PUT .../tags/{category}|
PUT .../classifications`DELETE .../tags/{id}|
DELETE .../classifications/{id}`PATCH .../classifications/{id}
GET .../classifications/{id}/versions
GET .../classifications/{id}/versions/{version}
Tag API changes
Currently, only two levels of tag hierarchy are supported. The first level is called the primary tag and the next level is called the secondary tag. We are moving away from this to any levels of nested tag hierarchy similar to Glossary and GlossaryTerms.
GET .../tags
that includes pagination and use filters to get tags under a tag category or a parent tagPOST .../tags/{category}
for the primary tag andPOST .../tags/{category}/{primaryTag} for the secondary tag
POST .../tags
with a fieldparent
where parent tag term can be passed to create nested tag hierarchyGET .../tags/{category}/{primaryTag}
for primary tag andGET .../tags/{categoryName}/{primaryTag}/{secondaryTag}
for secondary tagGET .../tags/name/{fqn}
GET .../tags/{id}
PUT .../tags/{category}/{primaryTag}
to update primary tag andPUT .../tags/{category}/{primaryTag}/secondaryTag
to update secondary tagPUT .../tags
DELETE .../{category}/{id}|
DELETE .../tags/{id}`PATCH .../tags/{id}.
** Use this for renaming the patch, changing hierarchy, etc.***GET .../tags/{id}/versions
GET .../tags/{id}/versions/{version}
Implementation notes
The resource classes
TagResource
andTagCategoryResource
useEntityResource
as the base class to eliminate a lot of duplicate code. Similarly,TagResourceTest
andTagCategoryResourceTest
useEntityResourceTest
as the base class to reuse code.