-
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: add source declaration links to API Explorer #578
Conversation
- describing each mining process more clearly
- getting cors errors trying to fetch declarationsIndex.json
- also added support for mining Java examples
- added tests for method and type source links
Looking at the source code changes I think the commit message (aka changelog entry) is fine but just wanted to re-iterate that the exact same changelog entry will show up in each of |
@@ -0,0 +1,38 @@ | |||
{ |
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.
any reason not to house this under packages/
? I realize there are no dependencies in either direction but still kind of seems to me like maybe we should keep all our typescript sdk-codegen packages under packages/
(and who knows, maybe there will be a dependency some day?)
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.
Yes, it is not a monorepo package and doesn't need all the baggage associated with that. If it ever becomes something we customize, we'll move it into packages/apix-files
. Currently, it's basically just a node script that needs to be isolated.
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.
Yeah, all those places were changed to support this so the CHANGELOG entry is appropriate.
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.
Code looks okay.
Some minor doc issues.
Some things to think about
apix-files/README.md
Outdated
@@ -0,0 +1,40 @@ | |||
# API Explorer file server | |||
|
|||
API Explorer (aka APIX) can be uses some JSON-formatted "index" files to augment the information provided in a specification. |
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.
API Explorer (aka APIX) can be uses some
?
API Explorer (aka APIX) uses some
instead?
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.
Well, it's definitely wrong now. I'll fix.
apix-files/README.md
Outdated
|
||
This will start the API Explorer file server at `http://localhost:30000` | ||
|
||
## Mining the mother lode |
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.
Any issues with mother lode as a politically correct term?
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 don't *think" that's a charged term. It's taken from mining but I guess we can change it to "examples index" and "examplesIndex.json" to be less obscure
@@ -28,7 +28,7 @@ import { TabList, Tab, TabPanels, TabPanel, useTabs } from '@looker/components' | |||
import { findExampleLanguages, IMethod } from '@looker/sdk-codegen' | |||
|
|||
import { CollapserCard } from '../Collapser' | |||
import { LodeContext } from '../../context/examples' | |||
import { LodeContext } from '../../context/motherlode' | |||
import { DocExamples } from './DocExamples' | |||
|
|||
interface DocSdkUsageProps { |
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 read this as DocSausageProps :D
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.
Definitely leaving it as is then!
oauth2_urls: [] | ||
} | ||
} | ||
``` | ||
the `http://localhost:3000` is for when you want to use the [API Explorer file server](/apix-files/README.md) |
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.
Be interesting to see how this works in marketplace. Do we want to put a dummy entry in so that user can configure hosts to point at it? Or just go with localhost:3000. 3000 pretty popular. Consider using non popular port
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.
whoops, documentation error. That's supposed to be 30000
- rename some things - fix some documentation errors
This comment has been minimized.
This comment has been minimized.
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
Test Results 3 files 18 suites 1m 5s ⏱️ For more details on these failures, see this check. Results for commit ce0e588. |
If a declarations index file produced with
yarn mine
is found, declaration source links get displayed for methods and typesThe
apix-files
folder was added to provide an http server to serve the index files from the current source.Run
yarn serve
fromapix-files
to serves the mined index files athttp://localhost:30000
.