Skip to content

Commit

Permalink
Merge 21a2ee6 into 39d47d1
Browse files Browse the repository at this point in the history
  • Loading branch information
dougal83 committed Jan 13, 2020
2 parents 39d47d1 + 21a2ee6 commit 5d4e304
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/site/Server.md
Expand Up @@ -141,6 +141,9 @@ const app = new RestApplication({
});
```

{% include note.html content="To completely disable API Explorer, we also need
to [disable the self-hosted REST API Explorer extension](./Self-hosted-REST-API-Explorer.md#disable-self-hosted-api-explorer)." %}

### Use a self-hosted API Explorer

Hosting the API Explorer at an external URL has a few downsides, for example a
Expand Down
16 changes: 16 additions & 0 deletions packages/rest-explorer/README.md
Expand Up @@ -90,6 +90,22 @@ Note also that you cannot use a url-relative path for the `servers` entry, as
the Swagger UI does not support that (yet). You may use a _host_-relative path
however.

### Disable Self-Hosted API Explorer

To disable the self-hosted API Explorer, remove the component from the
constructor of your custom Application class. Typically the component will be
located in `./src/application.ts` and consist of two items, for example:

```ts
this.bind(RestExplorerBindings.CONFIG).to({
path: '/openapi/ui',
});
this.component(RestExplorerComponent);
```

{% include note.html content="To completely disable API Explorer, we also need
to [disable the redirect to the externally hosted API Explorer](./Server.html#disable-redirect-to-api-explorer)." %}

#### Summary

For some common scenarios, here are recommended configurations to have the
Expand Down

0 comments on commit 5d4e304

Please sign in to comment.