Versions in this module Expand all Collapse all v0 v0.0.2 Jul 28, 2024 v0.0.1 Jul 21, 2024 Changes in this version + const InBody + const InCookie + const InFormData + const InHeader + const InPath + const InQuery + func SanitizeMethodPath(method, pathPattern string) (cleanMethod string, cleanPath string, pathParams []string, err error) + func WithContentType(contentType string) func(cu *ContentUnit) + func WithHTTPStatus(httpStatus int) func(cu *ContentUnit) + func WithOperationCtx(oc OperationContext, isProcessingResponse bool, in In) func(rc *jsonschema.ReflectContext) + type ContentOption func(cu *ContentUnit) + type ContentUnit struct + ContentType string + Description string + Format string + HTTPStatus int + IsDefault bool + Structure interface{} + func (c *ContentUnit) SetFieldMapping(in In, fieldToParamName map[string]string) + func (c ContentUnit) FieldMapping(in In) map[string]string + type ContentUnitPreparer interface + SetupContentUnit func(cu *ContentUnit) + type In string + type JSONSchemaCallback func(in In, paramName string, schema *jsonschema.SchemaOrBool, required bool) error + type JSONSchemaWalker interface + ResolveJSONSchemaRef func(ref string) (s jsonschema.SchemaOrBool, found bool) + WalkRequestJSONSchemas func(method string, cu ContentUnit, cb JSONSchemaCallback, ...) error + WalkResponseJSONSchemas func(cu ContentUnit, cb JSONSchemaCallback, done func(oc OperationContext)) error + type OperationContext interface + AddReqStructure func(i interface{}, options ...ContentOption) + AddRespStructure func(o interface{}, options ...ContentOption) + Method func() string + PathPattern func() string + Request func() []ContentUnit + Response func() []ContentUnit + UnknownParamsAreForbidden func(in In) bool + func OperationCtx(rc *jsonschema.ReflectContext) (OperationContext, bool) + type OperationInfo interface + AddSecurity func(securityName string, scopes ...string) + SetDescription func(description string) + SetID func(operationID string) + SetIsDeprecated func(isDeprecated bool) + SetSummary func(summary string) + SetTags func(tags ...string) + type OperationInfoReader interface + Description func() string + ID func() string + IsDeprecated func() bool + Summary func() string + Tags func() []string + type OperationState interface + IsProcessingResponse func() bool + ProcessingIn func() In + SetIsProcessingResponse func(isProcessingResponse bool) + SetProcessingIn func(in In) + type Reflector interface + AddOperation func(oc OperationContext) error + JSONSchemaReflector func() *jsonschema.Reflector + NewOperationContext func(method, pathPattern string) (OperationContext, error) + SpecSchema func() SpecSchema + type RequestBodyEnforcer interface + ForceRequestBody func() + type RequestJSONBodyEnforcer interface + ForceJSONRequestBody func() + type SpecSchema interface + Description func() string + SetAPIKeySecurity func(securityName string, fieldName string, fieldIn In, description string) + SetDescription func(d string) + SetHTTPBasicSecurity func(securityName string, description string) + SetHTTPBearerTokenSecurity func(securityName string, format string, description string) + SetTitle func(t string) + SetVersion func(v string) + Title func() string + Version func() string