Skip to content

Filter config: no documented way to exclude gateways/subscriptions from extraction #100

Description

Feature Request / Documentation Gap

Description

Customers cannot easily exclude entire resource type sections (e.g., gateways, subscriptions) from extraction using the filter configuration file. While the filter engine technically supports this (setting a field to an empty array [] excludes all resources of that type), this behavior is:

  1. Not documented in the generated filter config template
  2. Not intuitive — an empty array meaning "exclude all" is the opposite of what most users expect
  3. Missing from the template — gatewayNames and subscriptionNames are not shown in the sample configuration.extract.yaml generated by apiops init

Customer Report

"If we don't want to export gateways or subscriptions using the filter file, it appears there is currently no option to exclude these sections entirely from the export."

Current Behavior

The filter config template (src/templates/configs/filter-config.ts) only shows examples for: apiNames, productNames, backendNames, namedValueNames, loggerNames, diagnosticNames, tagNames, policyFragmentNames.

Missing from the template: gatewayNames, subscriptionNames, versionSetNames, groupNames, schemaNames, policyRestrictionNames, documentationNames, workspaceNames.

Filter Logic (for context)

From src/services/filter-service.ts:

  • If a filter field is undefined/absent → all resources of that type are included
  • If a filter field is an empty array [] → NO resources of that type are included
  • If a filter field has values → only matching resources are included

Proposed Fix

  1. Add all supported filter fields to the sample config template, including gatewayNames and subscriptionNames
  2. Document the "exclude all" pattern — make it clear that setting a field to [] excludes the entire resource type:
# To exclude ALL gateways from extraction, use an empty array:
# gatewayNames: []

# To exclude ALL subscriptions from extraction:
# subscriptionNames: []

Relevant Code

  • src/templates/configs/filter-config.ts — filter config template (missing fields)
  • src/services/filter-service.ts:60-70 — filter logic documentation
  • src/models/config.ts:21-38 — FilterConfig interface (all supported fields)
  • src/lib/config-loader.ts:54-89 — loader validates gatewayNames, subscriptionNames etc.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

EnhancementImprovement to existing functionalityP1This sprint

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions