Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.5.0][FEATURE] Implement Labels Feature #12746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dakshina99
Copy link
Contributor

Description

This PR implements the backend functionality to introduce a Labels Feature. The key features and enhancements included in this implementation are:

  • Label Management:

    • Create, update, delete, and retrieve labels.
    • Get label usages.
    • Associate labels with APIs in the platform.
  • Extensibility:

    • Designed to easily expand the label feature to support applications and other resource types, making it adaptable for future needs.
  • Resolves Label Feature api-manager#3503

@dakshina99 dakshina99 changed the title [4.5.0][FETURE] Implement Labels Feature [4.5.0][FEATURE] Implement Labels Feature Jan 12, 2025
@@ -4339,7 +4338,7 @@ public DocumentationContent getDocumentationContent(String apiId, String docId,
@Override
public String getAsyncAPIDefinitionForLabel(Identifier apiId, String labelName) throws APIManagementException {

List<Label> gatewayLabels;
// List<Label> gatewayLabels;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

@@ -95,6 +95,8 @@ public enum ExceptionCodes implements ErrorHandler {
409, "Cannot update API: %s:%s, due to the resources to remove are used by one or more API Products"),
API_CATEGORY_INVALID(
900345, "The API category is invalid.", 400, " The API category is invalid for API: %s"),
API_LABEL_INVALID(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use a different code here as labels and categories are used for two different purposes?

return hostsWithSchemes;
}
// /**
// * Get gateway host names with transport scheme mapping.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this commented code?

return null;
}

public Response labelsLabelIdDelete(String labelId, MessageContext messageContext) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we add operationId to the swagger definition and make the generated method names more readable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Label Feature
3 participants