Documentation
¶
Index ¶
- func ChannelToMessageTypeName(ch asyncapi.Channel) string
- func ForcePointerOnFields()
- func GenerateChannelAddr(ch *asyncapi.Channel) string
- func GenerateChannelAddrFromOp(op asyncapi.Operation) string
- func GetChildrenObjectSchemas(s asyncapi.Schema) []*asyncapi.Schema
- func HelpersFunctions() template.FuncMap
- func IsRequired(schema asyncapi.Schema, field string) bool
- func OpToChannelTypeName(op asyncapi.Operation) string
- func OpToMsgTypeName(op asyncapi.Operation) string
- func ReferenceToStructAttributePath(ref string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelToMessageTypeName ¶
ChannelToMessageTypeName will convert a channel to a message type name in the form of golang conventional type names.
func ForcePointerOnFields ¶ added in v0.45.0
func ForcePointerOnFields()
ForcePointerOnFields is used to force the generation of all fields as pointers, except for arrays.
func GenerateChannelAddr ¶
GenerateChannelAddr will generate a channel path with the given channel.
func GenerateChannelAddrFromOp ¶
GenerateChannelAddrFromOp will generate a channel path with the given operation.
func GetChildrenObjectSchemas ¶ added in v0.35.1
GetChildrenObjectSchemas will return all the children object schemas of a schema, only from first level and without AnyOf, AllOf and OneOf.
func HelpersFunctions ¶
HelpersFunctions returns the functions that can be used as helpers in a golang template.
func IsRequired ¶
IsRequired will check if a field is required in a asyncapi struct.
func OpToChannelTypeName ¶
OpToChannelTypeName will convert an operation to a channel type name in the form of golang conventional type names.
func OpToMsgTypeName ¶
OpToMsgTypeName will convert an operation to a message type name in the form of golang conventional type names.
func ReferenceToStructAttributePath ¶
ReferenceToStructAttributePath will convert a reference to a struct attribute path in the form of "a.b.c" where a, b and c are struct attributes in the form of golang conventional type names.
Types ¶
This section is empty.