-
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
Changes from 12 commits
d410067
21b480b
1fffecc
5b44e7b
815638c
f096250
df27d7a
ea67ee6
28b9f52
ac58fab
027522c
4860b62
00ce7ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,3 +70,7 @@ csharp/*.cache | |
|
||
# hackathon | ||
**/google-creds.json | ||
|
||
# apix indexes | ||
declarationsIndex.json | ||
/apix-files/yarn.lock |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
||
To use this server, clone this repository and: | ||
|
||
```sh | ||
yarn && yarn build | ||
yarn mine | ||
cd apix-files | ||
yarn serve | ||
``` | ||
|
||
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 commentThe 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 commentThe 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 |
||
|
||
`yarn mine` runs two specific miners: | ||
- `yarn mine:examples` | ||
- `yarn mine:declarations` | ||
|
||
which are briefly explained below | ||
|
||
### Example mining | ||
|
||
The source code in this repository is mined to find examples of using the Looker SDKs. | ||
|
||
```sh | ||
yarn mine:examples | ||
``` | ||
produces [motherlode.json](/motherlode.json), which is checked in. | ||
|
||
### Declaration mining | ||
|
||
```sh | ||
yarn mine:declarations | ||
``` | ||
|
||
produces [declarationsIndex.json](/declarationsIndex.json), which is not checked in (so it will be missing unless you've modified the declaration miner configuration to find your spec implementation). | ||
This file is used internally by Looker to provide direct links from API Explorer to the source code that defines our endpoints and API types. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any reason not to house this under There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
"name": "@looker/apix-files", | ||
"version": "21.0.11", | ||
"description": "Looker File Server for API Explorer", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
"author": "Looker", | ||
"license": "MIT", | ||
"private": true, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/looker-open-source/sdk-codegen.git", | ||
"directory": "packages/sdk-codegen-utils" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/looker-open-source/sdk-codegen/issues" | ||
}, | ||
"homepage": "https://github.com/looker-open-source/sdk-codegen/tree/main/packages/sdk-codegen-utils", | ||
"keywords": [ | ||
"Looker", | ||
"SDK", | ||
"API", | ||
"Explorer", | ||
"Files" | ||
], | ||
"dependencies": { | ||
"http-server": "^0.12.3" | ||
}, | ||
"scripts": { | ||
"serve": "http-server ../ -p 30000 --cors" | ||
} | ||
} |
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.
?
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.