Documentation
¶
Index ¶
- func ChannelToMessage(ch asyncapi.Channel, direction string) *asyncapi.Message
- func GenerateChannelPath(ch asyncapi.Channel) string
- func GetChildrenObjectSchemas(s asyncapi.Schema) []*asyncapi.Schema
- func HelpersFunctions() template.FuncMap
- func IsRequired(schema asyncapi.Schema, field string) bool
- func OperationName(channel asyncapi.Channel) string
- func ReferenceToStructAttributePath(ref string) string
- func ReferenceToTypeName(ref string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelToMessage ¶ added in v0.35.1
ChannelToMessage will convert a channel to its message, based on publish/subscribe.
func GenerateChannelPath ¶
GenerateChannelPath will generate a channel path with the given channel.
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 OperationName ¶
OperationName returns `operationId` value from Publish or Subscribe operation if any. If no `operationID` exists — return provided default value (`name`).
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.
func ReferenceToTypeName ¶
ReferenceToTypeName will convert a reference to a type name in the form of golang conventional type names.
Types ¶
This section is empty.