[Bug] Selective API operation extraction filter does not filter paths in specification.yaml
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with the apiops extract entry point and the filter configuration at configuration/extractor.config.yaml. Compare how the operations allow-list is applied to artifacts/apis/api1/operations/ versus artifacts/apis/api1/specification.yaml. Done means the specification contains only the selected operation paths while excluded operation artifacts remain absent.
Written by the indexing model from the issue text.
Description
Command that triggered the bug
apiops extract
Expected behavior
When an API is configured with an operations allow-list, the generated specification.yaml should contain only those selected operations.
For example:
apis:
- api1:
operations:
- create-resources
If the api1 API contains create-resources and test, only create-resources should appear in: specification.yaml
### Actual behavior
The extractor correctly filters the individual operation artifacts. Only the selected operation is generated under:
artifacts/apis/api1/operations/
However, artifacts/apis/api1/specification.yaml still contains the other operations path.
As a result, publishing the extracted artifacts can create the excluded operation in the target APIM instance, even though it was not listed in the extractor filter.
This is the same behavior described in for the older apiops [Azure/apiops#854](https://github.com/Azure/apiops/issues/854).
### apiops CLI version
1.0.3
### Environment details
APIOps CLI package: @azure-tools/apiops-cli
APIOps CLI version: 1.0.3
Node.js: 22.x or later
Package installation: npm ci
Command: apiops extract
Filter option: --filter configuration/extractor.config.yaml
### CI/CD environment
Azure DevOps
### Is this bug blocking you?
Yes
- Dominant language
- TypeScript
- Stars
- 29
- Forks
- 10
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 23
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/apiops-cli
-
type:question
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Azure/apiops-cli#277 ·
-
type:documentation
Difficulty 1/5 Under an hour Newbie friendliness 94/100
Azure/apiops-cli#250 ·
-
Documentation P2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Azure/apiops-cli#24 · 1 comment ·
-
type:bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Azure/apiops-cli#291 ·
-
type:bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Azure/apiops-cli#276 ·
All issues in Azure/apiops-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ontola/atomic-server#1625 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·