generators

package
v0.42.3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateValidateTags added in v0.40.0

func GenerateValidateTags[T any](schema asyncapi.Validations[T]) 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"
)

Directories

Path Synopsis
v2
v3

Jump to

Keyboard shortcuts

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