blueprint

package
v1.41.5 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderBlueprint

func RenderBlueprint(blueprintTemplate *template.Template,
	scheme *runtime.Scheme,
	rootOpenAPIDefinitionKey string,
	getOpenAPIDefinitions func(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition,
	blueprintDirectory string,
) error

RenderBlueprint renders a blueprint filesystem (writes the blueprint + the schema files) the `rootOpenAPIDefinitionKey` identifies the key in the OpenAPI definitions that identifies the root definition (import configuration of the landscaper component) Please note that the function `getOpenAPIDefinitions` must be generated using the `openapi-gen` binary

Types

type BlueprintImport

type BlueprintImport struct {
	// Name is the name of the import field
	Name string `json:"name"`
	// TargetType is the name of the target import
	TargetType string `json:"targetType,omitempty"`
	// Required refines if this import is required
	Required bool `json:"required"`
	// Schema is the JSONSchema of the import field
	Schema *BlueprintSchema `json:"schema,omitempty"`
}

BlueprintImport is an import field in the rendered blueprint

type BlueprintSchema

type BlueprintSchema struct {
	// Type is the type according to JSONSchema of the filed
	Type *string `json:"type,omitempty"`
	// Ref is a reference to the JSONSchema of the field
	// the schemas for fields are written as json files into the /schema directory in the blueprint filesystem
	Ref *string `json:"ref,omitempty"`
	// Description is a description of the field
	Description *string `json:"description,omitempty"`
	// Items are sub-items used when the field is an array type
	Items []BlueprintSchema `json:"items,omitempty"`
}

BlueprintSchema is a JSON schema field in the import field

Jump to

Keyboard shortcuts

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