Skip to content

Add wildcard/pattern matching support to filter configuration #48

Closed

Description

Problem

The current filter configuration system only supports exact name matching (case-insensitive) for resource filtering during extraction. Users must specify the complete, exact name of each resource they want to include or exclude.

For example, with this filter configuration:

apiNames:
  - echo-api
  - petstore-api

Only APIs named exactly "echo-api" and "petstore-api" (case-insensitive) will be extracted. There's no way to match multiple APIs with a common naming pattern.

User Need

Teams often use naming conventions for their APIM resources, such as:

  • All test APIs ending with -test
  • All production APIs starting with prod-
  • All internal APIs containing -internal-
  • All v2 APIs ending with -v2

Currently, users must list every single resource name individually, which becomes impractical when:

  • Managing dozens or hundreds of resources following a naming pattern
  • APIs/resources are created dynamically with consistent naming patterns
  • Filtering by category, environment, or version indicated in the name

Desired Capability

Users should be able to use wildcard patterns in filter configuration to match multiple resources by name pattern. Examples of desired patterns:

apiNames:
  - '*-test'        # Match all APIs ending with -test
  - 'prod-*'        # Match all APIs starting with prod-
  - '*-internal-*'  # Match all APIs containing -internal-
  - 'v2-*-api'      # Match APIs following v2-{name}-api pattern
  - '*'             # Match all APIs (explicit wildcard)

productNames:
  - 'test-*'        # Match all test products
  - '*-starter'     # Match all starter tier products

backendNames:
  - 'backend-*-prod'  # Match all production backends

Affected Filter Fields

All name-based filter configuration fields would benefit from wildcard support:

  • apiNames
  • productNames
  • backendNames
  • namedValueNames
  • loggerNames
  • diagnosticNames
  • tagNames
  • policyFragmentNames
  • gatewayNames
  • versionSetNames
  • groupNames
  • subscriptionNames
  • schemaNames
  • policyRestrictionNames
  • documentationNames

Expected Behavior

When a wildcard pattern is specified:

  • The filter should match any resource name matching the pattern (case-insensitive)
  • Multiple patterns can be combined in the same array
  • Exact names and patterns can be mixed in the same configuration
  • Clear documentation on supported wildcard syntax (e.g., * for any characters, ? for single character)

Activity

  1. EMaher commented on May 11, 2026

    @EMaher
    Contributor

    Related to #55

  2. added a commit that references this issue on May 19, 2026
    5f926d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

EnhancementImprovement to existing functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions