Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aau0 opened this issue Apr 11, 2024 · 3 comments
Closed
Labels
question Further information is requested

Comments

@aau0
Copy link

aau0 commented Apr 11, 2024

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

Copy link

  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
Copy link
Contributor

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

@waelkdouh waelkdouh added the question Further information is requested label Apr 11, 2024
@aau0
Copy link
Author

aau0 commented Apr 11, 2024

that works, thank you!

@aau0 aau0 closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants