petstore

package
v1.23.10 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 2 Imported by: 0

README

Enum support

Astra supports enums. Enums are defined as a list of strings. This tests:

  • Creating a custom enum format for the string type.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestIntEnum

type TestIntEnum int
const (
	TestIntEnumAvailable TestIntEnum = 1
	TestIntEnumSold      TestIntEnum = 2
)

type TestStringEnum

type TestStringEnum string
const (
	TestStringEnumAvailable TestStringEnum = "available"
	TestStringEnumSold      TestStringEnum = "sold"
)

type TestStructWithIntEnum

type TestStructWithIntEnum struct {
	// Enum
	Enum TestIntEnum `json:"enum,omitempty"`
}

type TestStructWithStringEnum

type TestStructWithStringEnum struct {
	// Enum
	Enum TestStringEnum `json:"enum,omitempty"`
}

Jump to

Keyboard shortcuts

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