-
Notifications
You must be signed in to change notification settings - Fork 192
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
feat: closest path match for API Explorer #811
Conversation
However, specs are being loaded before OAuth redirect occurs on return from OAuth handshake
It's a "too much OAuth" issue
# Conflicts: # packages/sdk/src/4.0/methodsInterface.ts
1. OauthScene hoisted to ApiExplorer from AppRouter. 2. AppRouter simplified now that OauthScene hoisted. 3. Simplified async functions in OauthScene. Fixed bug that lost returnUrl. 4. Fixed NPE in SideNav
APIX Tests 1 files 77 suites 2m 4s ⏱️ Results for commit 1a46454. |
Codegen Tests 1 files 6 suites 57s ⏱️ Results for commit 1a46454. |
Codegen Tests 1 files 6 suites 52s ⏱️ Results for commit 67e81e5. |
APIX Tests 1 files 77 suites 2m 54s ⏱️ For more details on these failures, see this check. Results for commit 67e81e5. |
Typescript Tests 6 files 75 suites 3m 35s ⏱️ Results for commit 67e81e5. |
Codegen Tests 1 files 6 suites 57s ⏱️ Results for commit 2af9b33. |
APIX Tests 1 files 77 suites 2m 42s ⏱️ Results for commit 2af9b33. |
Typescript Tests 6 files 75 suites 3m 29s ⏱️ Results for commit 2af9b33. |
Codegen Tests 1 files 6 suites 52s ⏱️ Results for commit c68c9fd. |
APIX Tests 1 files 77 suites 2m 43s ⏱️ Results for commit c68c9fd. |
Typescript Tests 6 files 75 suites 3m 24s ⏱️ Results for commit c68c9fd. |
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
aside from issues I found. Let's merge this and fix issues in smaller PRs
@@ -34,6 +34,16 @@ import { ApiSpecSelector } from './ApiSpecSelector' | |||
|
|||
const specState = getLoadedSpecState() | |||
|
|||
jest.mock('react-router-dom', () => { | |||
const ReactRouterDOM = jest.requireActual('react-router-dom') |
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.
I like this!
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.
awesome. that means I can quit for the week! 😃
This has more than just closest path match, but everything else was part of the journey
Closest path match
Closest path match means that changing spec versions in API Explorer (extension and stand-alone) will land the user on the "closest" path match when the spec key (API version) changes.
For example:
/3.1/methods/Homepage/delete_homepage
and the user select API4.0
creating/4.0/methods/Homepage/delete_homepage
endpoint doesn't exist, so APIX ends up at/4.0/methods/Homepage
because theHomepage
category still existsOtherwise, APIX may end up at
/4.0/methods
."Closest match" rules also apply for Types, but because types currently have no Category (a TODO item) APIX just ends up at
<speckey>/types
if the type in spec A doesn't exist in spec B