Documentation
¶
Index ¶
- Constants
- type Action
- type Config
- type EndpointSummary
- type JSONResult
- type ModifiedSummary
- type OperationSummary
- type ParameterSummary
- type ParametersSummary
- type PropertiesSummary
- type RequestBodySummary
- type RequestBodySummaryDetail
- type ResponseSummaryDetail
- type ResponsesSummary
- type ResponsesSummaryDetail
- type Result
- type SecuritySummary
- type SecuritySummaryDetail
- type SummaryMessageBuilder
Constants ¶
View Source
const ( ActionAdded = Action("added") ActionDeleted = Action("deleted") ActionModified = Action("modified") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
OutputFormat string `json:"output_format,omitempty"` // json, html, markdown, text
}
Config represents the config for a models.SpecDiff (SpecDiff.Config)
type EndpointSummary ¶
type JSONResult ¶
type JSONResult struct {
Added []*EndpointSummary `json:"added"`
Deleted []*EndpointSummary `json:"deleted"`
Deprecated []*EndpointSummary `json:"deprecated"`
Modified []*ModifiedSummary `json:"modified"`
Breaking bool `json:"breaking"`
Message string `json:"message"`
}
type ModifiedSummary ¶
type ModifiedSummary struct {
Old *OperationSummary `json:"old"`
New *OperationSummary `json:"new"`
Path string `json:"path"`
Method string `json:"method"`
Summary string `json:"summary"`
Description string `json:"description"`
Breaking bool `json:"breaking"`
Message string `json:"message"`
ParametersSummary *ParametersSummary `json:"parameters"`
RequestBodySummary *RequestBodySummary `json:"requestBody"`
ResponsesSummary *ResponsesSummary `json:"responses"`
SecuritySummary *SecuritySummary `json:"security"`
}
type OperationSummary ¶
type ParameterSummary ¶
type ParameterSummary struct {
Parameter, OldParameter, NewParameter *openapi3.Parameter `json:"-"`
Name string `json:"name"`
In string `json:"in"`
Description string `json:"description"`
Deprecated bool `json:"deprecated"` // TODO
Breaking bool `json:"breaking"`
Action Action `json:"action"`
Message string `json:"message"`
}
type ParametersSummary ¶
type ParametersSummary struct {
Breaking bool `json:"breaking"`
Message string `json:"message"`
Details []*ParameterSummary `json:"details"`
}
type PropertiesSummary ¶
type PropertiesSummary struct {
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
Action Action `json:"action"`
Breaking bool `json:"breaking"`
Message string `json:"message"`
Nested []*PropertiesSummary `json:"properties"`
Group string `json:"-"` // group that this property belongs to, e.g. items
}
type RequestBodySummary ¶
type RequestBodySummary struct {
Breaking bool `json:"breaking"`
Message string `json:"message"`
Description string `json:"description"`
Details []*RequestBodySummaryDetail `json:"details"`
}
type RequestBodySummaryDetail ¶
type RequestBodySummaryDetail struct {
ReqBody, OldReqBody, NewReqBody *openapi3.RequestBody `json:"-"`
Properties []*PropertiesSummary `json:"properties"`
Breaking bool `json:"breaking"`
Action Action `json:"action"`
Message string `json:"message"`
Name string `json:"name"`
}
type ResponseSummaryDetail ¶
type ResponsesSummary ¶
type ResponsesSummary struct {
Breaking bool `json:"breaking"`
Message string `json:"message"`
Details []*ResponsesSummaryDetail `json:"details"`
}
type ResponsesSummaryDetail ¶
type ResponsesSummaryDetail struct {
Res, OldRes, NewRes *openapi3.Response `json:"-"`
Details []*ResponseSummaryDetail `json:"details"`
Name string `json:"name"` // status code
Description string `json:"description"`
Action Action `json:"action"`
Breaking bool `json:"breaking"`
Message string `json:"message"`
}
type Result ¶
type Result struct {
JSON *JSONResult `json:"json,omitempty"`
HTML string `json:"html,omitempty"`
Markdown string `json:"markdown,omitempty"`
Text string `json:"text,omitempty"`
}
Result represents the result for a models.SpecDiff (SpecDiff.JSONResult)
type SecuritySummary ¶
type SecuritySummary struct {
Breaking bool `json:"breaking"`
Message string `json:"message"`
Details []*SecuritySummaryDetail `json:"details"`
}
type SecuritySummaryDetail ¶
type SummaryMessageBuilder ¶
type SummaryMessageBuilder interface {
// contains filtered or unexported methods
}
func NewMarkdownSummaryMessageBuilder ¶
func NewMarkdownSummaryMessageBuilder() SummaryMessageBuilder
Click to show internal directories.
Click to hide internal directories.