[Publisher] Suggestion/question for better flexibility in field parameterization
See original GitHub issueI just came across this tool and it looks promising. However, one feature that I’d miss is being able to parameterize ANY field I want in the API config.yml. I’ve been using dotnet-apim (derived from Azure-apim-devops-toolkit), which allows parameterization of any field in the yaml as well as in any policy files. It also supports if/else conditionals in the yaml. I’m not sure how that could work in apiops, perhaps same kind of syntax in ONE configuration file, instead of having a configuration file for each environment, with field parameterized as $(field)
. Then the parameterized fields could be passed in through command line options. I think this would provide for easier maintainability and flexibility. I’d be happy to help with the development if needed. Thanks.
Issue Analytics
- State:
- Created a year ago
- Comments:16 (11 by maintainers)
Top GitHub Comments
@levimatheri - We use the default .NET configuration for ApiOps, meaning that we also support command line arguments and environment variables for overrides. Haven’t tested those explicitly, but you should be able to use them instead of a
configuration.yml
if that works better.For instance, this
configuration.yml
can be translated to the following environment variables:
You can set the environment variables in your higher environment pipeline tasks. While less readable than YAML, they definitely fit certain use cases better. Here’s some documentation on structuring complex environment variables in .NET configuration.
Quick and dirty overrides can also be done at the command line level:
publisher.exe --apimServiceName myapimservice
. I’m not well-versed in .NET command line configurations, but here’s some documentation.Updated our Wiki with configuration information.