schemas

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSchemas

func GenSchemas(ctx context.Context, outDir string, conf *config.Spec, spec *openapi3.Spec)

GenSchemas generates the code for Terraform/jsonclient schemas, attribute maps, and conversion functions.

func GetAttrTypeMapName

func GetAttrTypeMapName(schemaName string) string

GetAttrTypeMapName generates the name of the codegen'ed map of Terraform schema types (attr.Type).

func GetAttributesMapName

func GetAttributesMapName(schemaName string) string

GetAttributesMapName generates the name of the codegen'ed map of Terraform schema attributes.

func GetJSONClientModelStructName

func GetJSONClientModelStructName(schemaName string) string

GetJSONClientModelStructName generates the name of the codegen'ed struct for use for sending/receiving jsonclient requests/responses

func GetJSONClientModelToTFFuncName

func GetJSONClientModelToTFFuncName(schemaName string) string

GetJSONClientModelToTFFuncName generates the name of the codegen'ed function for converting the jsonclient model struct to a TF model struct.

func GetTFModelStructName

func GetTFModelStructName(schemaName string) string

GetTFModelStructName generates the name of the codegen'ed Terraform model struct.

func GetTFModelToJSONClientFuncName

func GetTFModelToJSONClientFuncName(schemaName string) string

GetTFModelToJSONClientFuncName generates the name of the codegen'ed function for converting the TF model struct to a jsonclient model struct.

func ResolveSchema

func ResolveSchema(spec *openapi3.Spec, schemaOrRef *openapi3.SchemaOrRef) (*openapi3.Schema, error)

ResolveSchema resolves an openapi SchemaOrRef to a Schema.

func SchemaNameFromRef

func SchemaNameFromRef(ref string) string

SchemaNameFromRef returns a schema name from an OpenAPI ref string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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