k8s_client v0.1.3 K8s.Client.Swagger

Functions for converting swagger specs

Link to this section Summary

Functions

Generates route information from a swagger spec

Find arguments in a URL path

Map metadata to an K8s.Client action name

Returns kubernetes swagger spec

Returns the subaction from a path

Link to this section Functions

Link to this function

build(file)
build(binary()) :: map()
build(map()) :: map()

Generates route information from a swagger spec.

Link to this function

find_args(path_with_args)
find_args(binary()) :: [atom()]

Find arguments in a URL path.

Link to this function

gen_action_name(metadata)
gen_action_name(map()) :: binary()

Map metadata to an K8s.Client action name

Link to this function

gen_action_name(arg1, name)
gen_action_name(map(), binary()) :: binary()

Link to this function

spec()
spec() :: [binary()]

Returns kubernetes swagger spec

Can be set via config :k8s_client, spec: "priv/swagger/1.13.json" or via K8S_SPEC

This allows you to use a custom swagger specs with custom CRDs.

Examples

iex> K8s.Client.Swagger.spec()
"priv/swagger/1.13.json"
Link to this function

subaction(path)

Returns the subaction from a path