Documentation
¶
Index ¶
Constants ¶
View Source
const ( // JSON Schema type constants. TypeString = "string" TypeArray = "array" TypeObject = "object" TypeBoolean = "boolean" TypeInteger = "integer" TypeNumber = "number" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContentTypeProvider ¶
ContentTypeProvider allows you to override the content type for responses, allowing you to return a different content type like `application/problem+json` after using the `application/json` marshaller. This should be implemented by the response body struct.
type RequestBuilder ¶
func NewRequestBuilder ¶
func NewRequestBuilder(generator *SchemaGenerator, metadata *schema.Metadata, tagCfg config.TagConfig) RequestBuilder
NewRequestBuilder creates a new request builder.
type ResponseBuilder ¶
type ResponseBuilder interface {
BuildOperationResponses(op *model.Operation, responses map[int]reflect.Type) error
}
func NewResponseBuilder ¶
func NewResponseBuilder(generator *SchemaGenerator, metadata *schema.Metadata, tagCfg config.TagConfig) ResponseBuilder
NewResponseBuilder creates a new response builder.
type SchemaGenerator ¶
type SchemaGenerator struct {
// contains filtered or unexported fields
}
SchemaGenerator generates and caches OpenAPI schemas from Go types. It handles schema generation, caching, reference management, and type aliases.
func NewSchemaGenerator ¶
func NewSchemaGenerator(prefix string, m *schema.Metadata, tagCfg config.TagConfig) *SchemaGenerator
NewSchemaGenerator creates a new schema generator with the given configuration.
Click to show internal directories.
Click to hide internal directories.