Sign inSign up

plugandtrade/openapi-operator

By plugandtrade

•Updated almost 8 years ago

Open API operator for kubernetes

Image
0

1.1K

plugandtrade/openapi-operator repository overview

⁠OpenAPI Operator

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⁠

⁠Configure

The following environment variables are available to customize the template:

EnvDescriptionValues
OPEN_API_TEMPLATE_FILE_PATHPath to a swagger.yaml to use a base template. default priv/tmeplates/base.yaml.eex<file_path>
OPEN_API_TEMPLATE_TITLEBase template title. default: OpenAPI example<string>
OPEN_API_TEMPLATE_HOSTBase template host. default api-openapi.example.com<string>
OPEN_API_TEMPLATE_BASEPATHBase template basepath. default /<url_path>
OPEN_API_TEMPLATE_LOGO_URLLogo url. default http://plug-n-trade.com/img/about/pnt_ampersand.png<url>
OPEN_API_TEMPLATE_VERSIONBase template API version. default v1<string>

The following environment variables are available for runtime configuration:

⁠Base Template
  • TODO

⁠Configure targets

| ## Configure targets |

AnnotationDescriptionValues
"swagger.io/docs"If the service has swagger docstrue, 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>
⁠TODO

⁠Developing

⁠Prerequisites

Minikube or other K8s environment needed.

  • Intall dependencies
mix deps.get
  • Compile
mix compile
  • Running

iex -S mix

Tag summary

Content type

Image

Digest

Size

43.5 MB

Last updated

almost 8 years ago

docker pull plugandtrade/openapi-operator