Versions in this module Expand all Collapse all v0 v0.21.2 Sep 2, 2019 v0.21.1 Sep 2, 2019 Changes in this version + const StringType + var ArrayType = "array" + func JSONMarshal(t interface{}) ([]byte, error) + type Compatibility int + const Breaking + const NonBreaking + func (s *Compatibility) MarshalJSON() ([]byte, error) + func (s *Compatibility) UnmarshalJSON(b []byte) error + func (s Compatibility) String() string + type CompatibilityPolicy struct + ForChange map[SpecChangeCode]Compatibility + ForRequest map[SpecChangeCode]Compatibility + ForResponse map[SpecChangeCode]Compatibility + type DataDirection int + const Request + const Response + type DifferenceLocation struct + Method string + Node *Node + Response int + URL string + func (dl DifferenceLocation) AddNode(node *Node) DifferenceLocation + type FromArrayStruct struct + func FromStringArray(from []string) FromArrayStruct + func (f FromArrayStruct) DiffsTo(toArray []string) (added, deleted, common []string) + type FromMapStruct struct + func FromStringMap(srcMap map[string]interface{}) FromMapStruct + func (f FromMapStruct) DiffsTo(destMap map[string]interface{}) (added, deleted, common map[string]interface{}) + type Node struct + ChildNode *Node + Field string + IsArray bool + TypeName string + func (n *Node) AddLeafNode(toAdd *Node) *Node + func (n *Node) String() string + func (n Node) Copy() *Node + type OperationMap map[string]*spec.Operation + type Pair struct + First interface{} + Second interface{} + type PathItemOp struct + Operation *spec.Operation + ParentPathItem *spec.PathItem + type SpecAnalyser struct + AlreadyComparedDefinitions map[string]bool + Definitions1 spec.Definitions + Definitions2 spec.Definitions + Diffs SpecDifferences + func NewSpecAnalyser() *SpecAnalyser + func (sd *SpecAnalyser) Analyse(spec1, spec2 *spec.Swagger) error + func (sd *SpecAnalyser) CheckNumericTypeChanges(diffs []TypeDiff, type1, type2 spec.SchemaProps) []TypeDiff + func (sd *SpecAnalyser) CheckStringTypeChanges(diffs []TypeDiff, type1, type2 spec.SchemaProps) []TypeDiff + func (sd *SpecAnalyser) CheckToFromArrayType(diffs []TypeDiff, type1, type2 spec.SchemaProps) []TypeDiff + func (sd *SpecAnalyser) CheckToFromPrimitiveType(diffs []TypeDiff, type1, type2 spec.SchemaProps) []TypeDiff + func (sd *SpecAnalyser) CompareTypes(type1, type2 spec.SchemaProps) []TypeDiff + type SpecChangeCode int + const AddedConsumesFormat + const AddedDescripton + const AddedEndpoint + const AddedEnumValue + const AddedOptionalParam + const AddedProducesFormat + const AddedProperty + const AddedRequiredParam + const AddedRequiredProperty + const AddedResponse + const AddedResponseHeader + const AddedSchemes + const AddedTag + const ChangedBasePath + const ChangedDescripton + const ChangedHostURL + const ChangedOptionalToRequiredParam + const ChangedRequiredToOptional + const ChangedRequiredToOptionalParam + const ChangedResponseHeader + const ChangedTag + const ChangedToCompatibleType + const ChangedType + const DeletedConsumesFormat + const DeletedDeprecatedEndpoint + const DeletedDescripton + const DeletedEndpoint + const DeletedEnumValue + const DeletedOptionalParam + const DeletedProducesFormat + const DeletedProperty + const DeletedRequiredParam + const DeletedResponse + const DeletedResponseHeader + const DeletedSchemes + const DeletedTag + const NarrowedType + const NoChangeDetected + const WidenedType + func (s *SpecChangeCode) Description() (result string) + func (s *SpecChangeCode) MarshalJSON() ([]byte, error) + func (s *SpecChangeCode) UnmarshalJSON(b []byte) error + type SpecDifference struct + Code SpecChangeCode + Compatibility Compatibility + DiffInfo string + DifferenceLocation DifferenceLocation + func (sd SpecDifference) Matches(other SpecDifference) bool + func (sd SpecDifference) String() string + type SpecDifferences []SpecDifference + func Compare(spec1, spec2 *spec.Swagger) (diffs SpecDifferences, err error) + func (sd *SpecDifferences) ReportCompatibility() error + func (sd SpecDifferences) BreakingChangeCount() int + func (sd SpecDifferences) Contains(diff SpecDifference) bool + func (sd SpecDifferences) FilterIgnores(ignores SpecDifferences) SpecDifferences + func (sd SpecDifferences) ReportAllDiffs(fmtJSON bool) error + type TypeDiff struct + Change SpecChangeCode + Description string + FromType string + ToType string + type URLMethod struct + Method string + Path string + func (p URLMethod) MarshalText() (text []byte, err error) + type URLMethodResponse struct + Method string + Path string + Response string + type URLMethods map[URLMethod]*PathItemOp