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

URL scheme gets reset when using the Edit OpenAPI functionality #387

Open
jdloyd opened this issue Feb 17, 2025 · 0 comments
Open

URL scheme gets reset when using the Edit OpenAPI functionality #387

jdloyd opened this issue Feb 17, 2025 · 0 comments

Comments

@jdloyd
Copy link

jdloyd commented Feb 17, 2025

I am using Azure API Management plugin version 1.0.9 with VS Code. When editing an API using the OpenAPI Editor, the URL scheme gets reset to "https" no matter what the previous selection was. We have traced the issue down to the following code:

if (document.schemes === undefined) {

It would seem that "document.schemes" was removed in OpenAPI 3.0.1 so that value will always be unset. Our understanding of OpenAPI 3 is that the schemes are now defined in the "servers" section of the spec. I believe the fix would be to update the code above to reflect that change.

STEPS TO REPRODUCE

  1. Create an API in Azure APIM
  2. Set the URL scheme to something OTHER THAN "https"
  3. Open the API in VS Code
  4. Make some change
  5. Save the API in VS Code and upload to the server.
  6. Check URL Scheme in APIM - it will now be set to "https"
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

1 participant