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

[BUG] API Description cannot be updated using publishing configuration, only API specification #563

Open
erikhjensen opened this issue Jun 6, 2024 · 4 comments

Comments

@erikhjensen
Copy link

Release version

v5.1.4

Describe the bug

For an existing API, and for pushing a new API where none was present in APIM. The Description field on the Settings tab for the API will not be updated using the override and from what I can see, also the apiInformation.json. The only successful means I've seen to get it to update is by baking it into the API Specification. If we have multiple environments and desired to have an Environment distinction in that description then we have to update the API spec's info.description which is not ideal. Its possible this is just an Azure Portal UI quirk whereby it just shows the info.description but under the hood, the objectd models' description is as specified.

In trace-mode, the API Ops CLI is sending the description from the publishing override yaml. The following API was used for reference when trying to find if it's a misconfiguration of the override. https://learn.microsoft.com/en-us/rest/api/apimanagement/apis/update?view=rest-apimanagement-2022-08-01&tabs=HTTP#request-body

apiVersionDescription does show its update when you look at the description column on the Revisions screen.

Expected behavior

The Description field in the Settings tab of the Azure Portal is reflecting the content pushed by API Ops using what I believe is this API - Apis - Create Or Update when the properties.description or, description field is set in the publishing properties.

Actual behavior

The description field is only updated in the UI when the API Specification's info.description field is updated. However, the API's Display Name, Name, Path and serviceUrl do take their values from the property overrides.

Reproduction Steps

Specify a new description in the property override that differs from the info.description in the API's specification such as in the case of a sub-environment.

Copy link

github-actions bot commented Jun 6, 2024

  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.

@guythetechie
Copy link
Contributor

@erikhjensen

As described in our Wiki, we don't handle conflicts between the apiInformation.json and specification file. We pass both to APIM and let it handle any conflicts.

As you described, looks like APIM favors the specification file over the information file for API descriptions. Can you just remove the info.description property from the specification so that APIM uses what's in the apiInformation.json?

@lavanyar77
Copy link

i do not have info.description in the api spec
"info": {
"title": "Validator API (@assembly.spec.env@)",
"version": "v1.0.0"
},
I am passing the description only in the apiInformation.json. still description field is not updated.

@fabienmazieres
Copy link
Contributor

I have seen this behavior too, one API had its description changed after creation and update in portal is still the original value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants