Open API operator for kubernetes
1.1K
A OpenAPI (swagger) spec combiner for kubernetes
Finds specs by finding k8s services with the swagger.io/docs annotation set.
Service urls are injected into a base template as a markdown list. Requests for
a specific specification is reverse proxied to the target. The UI is rendered using ReDoc
The following environment variables are available to customize the template:
| Env | Description | Values |
|---|---|---|
OPEN_API_TEMPLATE_FILE_PATH | Path to a swagger.yaml to use a base template. default priv/tmeplates/base.yaml.eex | <file_path> |
OPEN_API_TEMPLATE_TITLE | Base template title. default: OpenAPI example | <string> |
OPEN_API_TEMPLATE_HOST | Base template host. default api-openapi.example.com | <string> |
OPEN_API_TEMPLATE_BASEPATH | Base template basepath. default / | <url_path> |
OPEN_API_TEMPLATE_LOGO_URL | Logo url. default http://plug-n-trade.com/img/about/pnt_ampersand.png | <url> |
OPEN_API_TEMPLATE_VERSION | Base template API version. default v1 | <string> |
The following environment variables are available for runtime configuration:
| ## Configure targets |
| Annotation | Description | Values |
|---|---|---|
"swagger.io/docs" | If the service has swagger docs | true, false |
"swagger.io/path" | Http path. default: /swagger/v2/swagger.json | <string> |
"swagger.io/version" | Swagger version. default v2 | <string> |
"swagger.io/port" | Http port. default 80 | <int> |
Minikube or other K8s environment needed.
mix deps.get
mix compile
iex -S mix
Content type
Image
Digest
Size
43.5 MB
Last updated
almost 8 years ago
docker pull plugandtrade/openapi-operator