Azure / apiops

APIOps applies the concepts of GitOps and DevOps to API deployment. By using practices from these two methodologies, APIOps can enable everyone involved in the lifecycle of API design, development, and deployment with self-service and automated tools to ensure the quality of the specifications and APIs that they’re building.
https://azure.github.io/apiops
MIT License
328 stars 193 forks source link

What is the keyword so extractor doesnt extract policy fragment and version sets? #688

Open martin2176 opened 1 month ago

martin2176 commented 1 month ago

Release version

6.0.1.3

Question Details

I have the below in configuration.extractor.yaml. However it is still extracting globalpolicy fragment and apiVersionSetsNames Q1. What is the correct keyword to use so that it doesn't extract globalpolicy fragment and versionsets? Q2. Can the documentation on wiki be updated to reflect all the supported resources and the correct keyword to use etc?

Image

Expected behavior

the extractor should skip over global policy fragments and apiversionsets

Actual behavior

the extractor is pulling down global policy fragments and apiversionsets

Reproduction Steps

use the attached configuration.extractor.yaml apiNames:

github-actions[bot] commented 1 month ago
  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.
martin2176 commented 3 weeks ago

@waelkdouh I think this is a bug than a new feature. The documentation says it should be possible to exclude globalpolicyfragments and version sets, however it is not excluding it.

guythetechie commented 2 weeks ago

@martin2176 - looking at the code, I don't see a filter for global policy. Can you point to the documentation where it says you can filter out global policy?

As for version sets, it should be versionSetNames in configuration.extractor.yaml.

martin2176 commented 2 weeks ago

@guythetechie You are right. I dont see a filter for global policy in Doc. So that would be a feature request. However, I added versionSetNames: [none] as below. And ran an extract specifying configuration.extractor.yaml. But, it is still extracting versionsets (pls see attached pic of the folder structures of the artifacts extracted) PS: The only api I am extracting - api "test" doesnt have any version sets.

Image

Image

rubenaster commented 3 days ago

@martin2176 please try the following with version v6.0.1.3

versionSetNames: [ignore]

Works like a charm for me.

martin2176 commented 3 days ago

@martin2176 please try the following with version v6.0.1.3

versionSetNames: [ignore]

Works like a charm for me.

Thanks . that worked and it excluded versionsets.