Documentation ¶
Index ¶
- func GenSchemas(ctx context.Context, outDir string, conf *config.Spec, spec *openapi3.Spec)
- func GetAttrTypeMapName(schemaName string) string
- func GetAttributesMapName(schemaName string) string
- func GetJSONClientModelStructName(schemaName string) string
- func GetJSONClientModelToTFFuncName(schemaName string) string
- func GetTFModelStructName(schemaName string) string
- func GetTFModelToJSONClientFuncName(schemaName string) string
- func ResolveSchema(spec *openapi3.Spec, schemaOrRef *openapi3.SchemaOrRef) (*openapi3.Schema, error)
- func SchemaNameFromRef(ref string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenSchemas ¶
GenSchemas generates the code for Terraform/jsonclient schemas, attribute maps, and conversion functions.
func GetAttrTypeMapName ¶
GetAttrTypeMapName generates the name of the codegen'ed map of Terraform schema types (attr.Type).
func GetAttributesMapName ¶
GetAttributesMapName generates the name of the codegen'ed map of Terraform schema attributes.
func GetJSONClientModelStructName ¶
GetJSONClientModelStructName generates the name of the codegen'ed struct for use for sending/receiving jsonclient requests/responses
func GetJSONClientModelToTFFuncName ¶
GetJSONClientModelToTFFuncName generates the name of the codegen'ed function for converting the jsonclient model struct to a TF model struct.
func GetTFModelStructName ¶
GetTFModelStructName generates the name of the codegen'ed Terraform model struct.
func GetTFModelToJSONClientFuncName ¶
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 ¶
SchemaNameFromRef returns a schema name from an OpenAPI ref string.
Types ¶
This section is empty.