Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Apr 2, 2024
1 parent 4da0f6f commit d78c8da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/pages/configuration/config/api-docs.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
## API Docs

Behind the scenes, hyperglass uses [FastAPI](https://fastapi.tiangolo.com/), which automatically generates documentation for the hyperglass REST API. The `docs` section allows users to customize the look, feel, and text used for the REST API documentation.
hyperglass automatically generates documentation for the REST API. The `docs` section allows users to customize the look, feel, and text used for the REST API documentation.

| Parameter | Type | Default Value | Description |
| :----------------- | :------ | :----------------------------- | :---------------------------------------------------------------------------------------------- |
| `docs.base_url` | String | https://lg.example.com | Used for REST API samples. See the [demo](https://demo.hyperglass.dev/api/docs) for an example. |
| `docs.enable` | Boolean | `true` | Enable or disable the REST API documentation. |
| `docs.mode` | String | redoc | FastAPI supports two UI libraries/themes for autogenerated docs: `redoc` and `swagger`. |
| `docs.path` | String | /api/docs | Path to the REST API documentation. |
| `docs.title` | String | `site_title` API Documentation | API docs title. Uses the `site_title` parameter from the [global](#global) parameters. |
| `docs.description` | String | | API docs description. Appears below the title. |
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/configuration/devices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Each configured device may have the following parameters:
| `http` | Mapping | | Mapping/dict of [HTTP client options](/configuration/devices/http-device.mdx), if this device is connected via HTTP. |
| `proxy` | Mapping | | Mapping/dict of [SSH proxy config](/configuration/devices/ssh-proxy.mdx) to use for this device's requests. |

<Callout type="info">
<Callout type="tip">

hyperglass ships with predefined [directives](/configuration/directives.mdx) (commands) for the following [platforms](platforms.mdx):

Expand Down
10 changes: 8 additions & 2 deletions docs/pages/configuration/directives.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { Callout } from "nextra-theme-docs";

## What is a directive?

A **directive** is a defined configuration for a **command** to run on a device. For example, a BGP Route query is a built-in directive. A directive defines:
<Callout type="tip">

A <strong style={{color: "#ff5e5b"}}>directive</strong> is a defined configuration for one or more **commands** to run on a device. For example, a BGP Route query is a built-in directive. A directive defines:

- What command to run on the device
- What command (or commands) to run on the device
- Type of UI field, text input or select
- If the field can accept multiple values
- Help information to show about the directive
- Validation rules

</Callout>

Each directive has the following options:

| Parameter | Type | Default Value | Description |
Expand Down

0 comments on commit d78c8da

Please sign in to comment.