-
Notifications
You must be signed in to change notification settings - Fork 12
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 Prefix change #315
URL Prefix change #315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Needs some changes based off the conversation in slack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! 👍
I just requested some changes. A bunch of non-consoledot APIs are mislabeled as consoledot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested 2 changes:
- Let's not define the
serverUrl
for the Ansible automation controller API - Re-run the automations so that your changes gets updated in
/pachages/common/config/api.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! 🎉
The defaulturl is set to example.com and the logic grabs the baseurl from the openapi spec and tries to create a valid URL.
What I noticed was that some openapi specs have stuff like "/api/v1/example" as their base url which returns an error when trying to cast it as a URL in the code.
What I changed was that the defaulturl is now console.redhat.com instead of example.com, and I added a check to see if the baseurl from the openapi spec starts with a "/". If it does then I append it to the end of the defaulturl and use that as the url in the example code box.
If the openapi spec has a valid url already in it then the check is skipped and it works as expected
It is fixing this https://issues.redhat.com/browse/RHCLOUD-31601