Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 5 additions & 27 deletions packages/extension-api-explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,14 @@
The API Explorer extension can be manually installed and run with a Looker instance using the following steps:

1. create a new LookML project called `apix`
2. create a new model. In `apix.model`, put:
1. create a new model. In `apix.model`, put:
```lookml
connection: "<any valid connection name>"
```
3. in `manifest.lkml` put:
```lookml
project_name: "api-explorer"
application: api-explorer {
label: "API Explorer"
# file: "bundle.js"
url: "https://localhost:8080/dist/bundle.js"
entitlements: {
local_storage: yes
navigation: no
new_window: yes
new_window_external_urls: ["https://looker.com/*", "https://developer.mozilla.org/*", "https://docs.looker.com/*"]
raw_api_request: yes
use_form_submit: yes
use_embeds: yes
use_clipboard: yes
core_api_methods: ["versions", "api_spec"]
external_api_urls : ["https://raw.githubusercontent.com","http://localhost:30000","https://localhost:8080","https://static-a.cdn.looker.app","https://docs.looker.com","https://developer.mozilla.org/"]
oauth2_urls: []
}
}
```
the `http://localhost:30000` is for when you want to use the [API Explorer file server](/apix-files/README.md)
4. save all changes and deploy to production
5. in the root of `sdk-codegen`:
1. Use the contents of the linked [`manifest.lkml`](manifest.lkml) as the project's `manifest.lkml`. The `http://localhost:30000` url is for the optional [API Explorer file server](/apix-files/README.md)
1. save all changes and deploy to production
1. in the root of `sdk-codegen`:
```sh
yarn && yarn build && yarn dev:xapix
```
6. on the Looker web page, click `Browse|API Explorer` to view the API Explorer
1. on the Looker web page, click `Browse|API Explorer` to view the API Explorer
4 changes: 3 additions & 1 deletion packages/extension-api-explorer/bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rm -rf dist/
echo "Creating extension-api-explorer production bundle"
yarn bundle
BUNDLE=$(pwd)"/dist/bundle.js"
MANIFEST=$(pwd)"/manifest.lkml"

cd "${ROOT}"/..
if [ -d "extension-api-explorer" ]
Expand All @@ -42,7 +43,8 @@ fi
echo "Copying extension bundle into repo"
git checkout main || { echo "Error checking out branch"; exit 1; }
cp "${BUNDLE}" .
cp "${MANIFEST}" .
echo "Pushing changes to remote"
git add bundle.js && git commit -m "${commit_msg}" && git push || { exit 1; }
git add bundle.js manifest.lkml && git commit -m "${commit_msg}" && git push || { exit 1; }
echo "The extension's bundle commit hash is:"
git rev-parse HEAD
25 changes: 25 additions & 0 deletions packages/extension-api-explorer/manifest.lkml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
project_name: "api-explorer"

application: api-explorer {
label: "API Explorer"
# file: "bundle.js"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this line intended to be checked in?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

url: "https://localhost:8080/dist/bundle.js"
entitlements: {
local_storage: yes
navigation: no
new_window: yes
new_window_external_urls: ["https://looker.com/*", "https://developer.mozilla.org/*", "https://docs.looker.com/*"]
raw_api_request: yes
use_form_submit: yes
use_embeds: yes
use_clipboard: yes
core_api_methods: ["versions", "api_spec"]
external_api_urls : ["https://raw.githubusercontent.com","http://localhost:30000","https://localhost:8080","https://static-a.cdn.looker.app","https://docs.looker.com","https://developer.mozilla.org/"]
oauth2_urls: []
}
}

constant: CONNECTION_NAME {
value: ""
export: override_optional
}