Documentation
¶
Index ¶
- Constants
- type APISpecResource
- type APISpecSchema
- type Attribute
- type Attributes
- type BoolAttribute
- type ComputedOptionalRequired
- type CustomDefault
- type ElemType
- type Float64Attribute
- type Int64Attribute
- type ListAttribute
- type ListNestedAttribute
- type MapAttribute
- type MapNestedAttribute
- type Model
- type NestedAttributeObject
- type NumberAttribute
- type Operation
- type Resource
- type Schema
- type SetAttribute
- type SetNestedAttribute
- type SingleNestedAttribute
- type SnakeCaseString
- type StringAttribute
- type TimeoutsAttribute
Constants ¶
View Source
const ( OASTypeString = "string" OASTypeInteger = "integer" OASTypeNumber = "number" OASTypeBoolean = "boolean" OASTypeArray = "array" OASTypeObject = "object" OASFormatDouble = "double" OASFormatFloat = "float" OASFormatPassword = "password" OASFormatSet = "set" OASResponseCodeOK = "200" OASResponseCodeCreated = "201" OASPathParam = "path" DefaultDeprecationMsg = "This resource has been deprecated" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APISpecResource ¶
type APISpecSchema ¶
func BuildSchema ¶
func BuildSchema(proxy *base.SchemaProxy) (*APISpecSchema, error)
This function only builds the schema from a proxy and returns the basic type and format without handling oneOf, anyOf, allOf, or nullable types.
func (*APISpecSchema) GetComputability ¶
func (s *APISpecSchema) GetComputability(name string) ComputedOptionalRequired
func (*APISpecSchema) GetDeprecationMessage ¶
func (s *APISpecSchema) GetDeprecationMessage() *string
func (*APISpecSchema) GetDescription ¶
func (s *APISpecSchema) GetDescription() *string
func (*APISpecSchema) IsSensitive ¶
func (s *APISpecSchema) IsSensitive() *bool
type Attribute ¶
type Attribute struct { List *ListAttribute SetNested *SetNestedAttribute Float64 *Float64Attribute String *StringAttribute Bool *BoolAttribute ListNested *ListNestedAttribute Map *MapAttribute MapNested *MapNestedAttribute Number *NumberAttribute Set *SetAttribute Int64 *Int64Attribute SingleNested *SingleNestedAttribute Timeouts *TimeoutsAttribute Description *string Name SnakeCaseString DeprecationMessage *string Sensitive *bool ComputedOptionalRequired ComputedOptionalRequired }
type Attributes ¶
type Attributes []Attribute
type BoolAttribute ¶
type BoolAttribute struct {
Default *bool
}
type ComputedOptionalRequired ¶
type ComputedOptionalRequired string
const ( Computed ComputedOptionalRequired = "computed" ComputedOptional ComputedOptionalRequired = "computed_optional" Optional ComputedOptionalRequired = "optional" Required ComputedOptionalRequired = "required" )
type CustomDefault ¶
type Float64Attribute ¶
type Float64Attribute struct {
Default *float64
}
type Int64Attribute ¶
type Int64Attribute struct {
Default *int64
}
type ListAttribute ¶
type ListAttribute struct { Default *CustomDefault ElementType ElemType }
type ListNestedAttribute ¶
type ListNestedAttribute struct { Default *CustomDefault NestedObject NestedAttributeObject }
type MapAttribute ¶
type MapAttribute struct { Default *CustomDefault ElementType ElemType }
type MapNestedAttribute ¶
type MapNestedAttribute struct { Default *CustomDefault NestedObject NestedAttributeObject }
type NestedAttributeObject ¶
type NestedAttributeObject struct {
Attributes Attributes
}
type NumberAttribute ¶
type NumberAttribute struct {
Default *CustomDefault
}
type Resource ¶
type Resource struct { Schema *Schema Name SnakeCaseString }
type Schema ¶
type Schema struct { Description *string DeprecationMessage *string Attributes Attributes }
type SetAttribute ¶
type SetAttribute struct { Default *CustomDefault ElementType ElemType }
type SetNestedAttribute ¶
type SetNestedAttribute struct { Default *CustomDefault NestedObject NestedAttributeObject }
type SingleNestedAttribute ¶
type SingleNestedAttribute struct { Default *CustomDefault NestedObject NestedAttributeObject }
type SnakeCaseString ¶
type SnakeCaseString string
func (SnakeCaseString) LowerCaseNoUnderscore ¶
func (snake SnakeCaseString) LowerCaseNoUnderscore() string
func (SnakeCaseString) PascalCase ¶
func (snake SnakeCaseString) PascalCase() string
func (SnakeCaseString) SnakeCase ¶
func (snake SnakeCaseString) SnakeCase() string
type StringAttribute ¶
type StringAttribute struct {
Default *string
}
type TimeoutsAttribute ¶
type TimeoutsAttribute struct {
ConfigurableTimeouts []Operation
}
Click to show internal directories.
Click to hide internal directories.