openapi

package
v0.17.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PatchForResourceUpdate

func PatchForResourceUpdate(
	client discovery.OpenAPISchemaInterface,
	lastSubmitted, currentSubmitted, liveOldObj *unstructured.Unstructured,
) ([]byte, types.PatchType, error)

PatchForResourceUpdate introspects on the OpenAPI spec exposed by some client, and attempts to generate a strategic merge patch for use in a resource update. If there is no specification of how to generate a strategic merge patch, we fall back to JSON merge patch.

func Pluck added in v0.15.0

func Pluck(obj map[string]interface{}, path ...string) (interface{}, bool)

Pluck obtains the property identified by the string components in `path`. For example, `Pluck(foo, "bar", "baz")` returns `foo.bar.baz`.

func PropertiesChanged added in v0.16.0

func PropertiesChanged(oldObj, newObj map[string]interface{}, paths []string) ([]string, error)

PropertiesChanged compares two versions of an object to see if any path specified in `paths` has been changed. Paths are specified as JSONPaths, e.g., `.spec.accessModes` refers to `{spec: {accessModes: {}}}`.

func ValidateAgainstSchema

func ValidateAgainstSchema(
	client discovery.OpenAPISchemaInterface, obj *unstructured.Unstructured,
) error

ValidateAgainstSchema validates a document against the schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL