Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateJSONTags ¶ added in v0.43.0
func GenerateJSONTags[T any](schema asyncapi.Validations[T], field string) string
GenerateJSONTags returns the "json" tag for a given field in a struct, based on the asyncapi contract.
func GenerateValidateTags ¶ added in v0.40.0
func GenerateValidateTags[T any](schema asyncapi.Validations[T], isPointer bool, schemaType string) string
GenerateValidateTags returns the "validate" tag for a given field in a struct, based on the asyncapi contract. This tag can then be used by go-playground/validator/v10 to validate the struct's content.
Types ¶
type Side ¶ added in v0.3.1
type Side string
Side represents the side of the code generation based on asyncapi documentation, i.e in front (user) or behind (application) asyncapi specification.
const ( // SideIsApplication is the application side based on asyncapi documentation, // i.e. the side that stand behind of the asyncapi specification. SideIsApplication Side = "app" // SideIsUser is the user side based on asyncapi documentation, // i.e. the side that use the asyncapi specification. SideIsUser Side = "user" )
Click to show internal directories.
Click to hide internal directories.