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
312 stars 182 forks source link

[Question] Is it possible to override an API Operation set-backend-service? #526

Closed aau0 closed 5 months ago

aau0 commented 5 months ago

Release version

v5.1.4

Question Details

For a specific API operation, I "set-backend-service" "base-url" to a specific url. But when deploying to another environment want to configure this value to the environment specific url. Currently there is no sample of this in the configuration.[env].yaml files, and I'm not seeing configuration within the ApiOperation.cs code. Just wanted to confirm if this configuration was available or not.

Expected behavior

n/a

Actual behavior

n/a

Reproduction Steps

create an API create an operation in the API from the operation backend "Service URL", checkbox override, fill in a "Service URL" run extractor operations folder is created with a policy.xml file policy.xml file contains set-backend-service with base-url cannot find a way to override the base-url from the configuration.[env].yaml file

github-actions[bot] commented 5 months 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.
waelkdouh commented 5 months ago

You just use a namedvalue instead of hard coded url. Then override the namedvalue as you promote across environments.

aau0 commented 5 months ago

that works, thank you!