Versions in this module Expand all Collapse all v1 v1.8.2 Sep 12, 2023 v1.8.1 Sep 11, 2023 Changes in this version + const ExcludeDescriptionOption + const ExcludeEndpointsOption + const ExcludeExamplesOption + const ExcludeSummaryOption + const ExcludeTitleOption + const SinceDateExtension + const SunsetExtension + const XExtensibleEnumExtension + const XStabilityLevelExtension + var DefaultSinceDate = civil.Date + var ExcludeDiffOptions = []string + var ParamLocations = []string + func GetPathsDiff(config *Config, s1, s2 []load.SpecInfo) (*Diff, *OperationsSourcesMap, error) + func GetWithOperationsSourcesMap(config *Config, s1, s2 *load.SpecInfo) (*Diff, *OperationsSourcesMap, error) + type CallbacksDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedCallbacks + func (diff *CallbacksDiff) Empty() bool + type ComponentsDiff struct + CallbacksDiff *CallbacksDiff + ExamplesDiff *ExamplesDiff + HeadersDiff *HeadersDiff + LinksDiff *LinksDiff + ParametersDiff *ParametersDiff + RequestBodiesDiff *RequestBodiesDiff + ResponsesDiff *ResponsesDiff + SchemasDiff *SchemasDiff + SecuritySchemesDiff *SecuritySchemesDiff + type Config struct + ExcludeElements utils.StringSet + FilterExtension string + IncludeExtensions utils.StringSet + IncludePathParams bool + PathFilter string + PathPrefixBase string + PathPrefixRevision string + PathStripPrefixBase string + PathStripPrefixRevision string + func NewConfig() *Config + func (config *Config) IsExcludeDescription() bool + func (config *Config) IsExcludeEndpoints() bool + func (config *Config) IsExcludeExamples() bool + func (config *Config) IsExcludeSummary() bool + func (config *Config) IsExcludeTitle() bool + func (config *Config) WithCheckBreaking() *Config + func (config *Config) WithExcludeElements(excludeElements []string) *Config + type ContactDiff struct + Added bool + Deleted bool + EmailDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + NameDiff *ValueDiff + URLDiff *ValueDiff + func (diff *ContactDiff) Empty() bool + type ContentDiff struct + MediaTypeAdded utils.StringList + MediaTypeDeleted utils.StringList + MediaTypeModified ModifiedMediaTypes + func (diff *ContentDiff) Empty() bool + type DetailName string + const CallbacksDetail + const EndpointsDetail + const ExamplesDetail + const ExternalDocsDetail + const HeadersDetail + const LinksDetail + const ParametersDetail + const PathsDetail + const RequestBodiesDetail + const ResponsesDetail + const SchemasDetail + const SecurityDetail + const SecuritySchemesDetail + const ServersDetail + const TagsDetail + type Diff struct + EndpointsDiff *EndpointsDiff + ExtensionsDiff *ExtensionsDiff + ExternalDocsDiff *ExternalDocsDiff + InfoDiff *InfoDiff + OpenAPIDiff *ValueDiff + PathsDiff *PathsDiff + SecurityDiff *SecurityRequirementsDiff + ServersDiff *ServersDiff + TagsDiff *TagsDiff + func Get(config *Config, s1, s2 *openapi3.T) (*Diff, error) + func (diff *Diff) Empty() bool + func (diff *Diff) GetSummary() *Summary + func (diff *Diff) Patch(s *openapi3.T) error + type DiscriminatorDiff struct + Added bool + Deleted bool + ExtensionsDiff *ExtensionsDiff + MappingDiff *StringMapDiff + PropertyNameDiff *ValueDiff + func (diff *DiscriminatorDiff) Empty() bool + type EncodingDiff struct + AllowReservedDiff *ValueDiff + ContentTypeDiff *ValueDiff + ExplodeDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + HeadersDiff *HeadersDiff + StyleDiff *ValueDiff + func (diff *EncodingDiff) Empty() bool + type EncodingsDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedEncodings + func (diff *EncodingsDiff) Empty() bool + type Endpoint struct + Method string + Path string + type Endpoints []Endpoint + func (endpoints Endpoints) Len() int + func (endpoints Endpoints) Less(i, j int) bool + func (endpoints Endpoints) Swap(i, j int) + type EndpointsDiff struct + Added Endpoints + Deleted Endpoints + Modified ModifiedEndpoints + func (diff *EndpointsDiff) Empty() bool + type EnumDiff struct + Added EnumValues + Deleted EnumValues + EnumAdded bool + EnumDeleted bool + func (enumDiff *EnumDiff) Empty() bool + func (enumDiff *EnumDiff) Patch(enum *[]interface{}) + type EnumValues []interface + type ExampleDiff struct + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + ExternalValueDiff *ValueDiff + SummaryDiff *ValueDiff + ValueDiff *ValueDiff + func (diff *ExampleDiff) Empty() bool + type ExamplesDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedExamples + func (diff *ExamplesDiff) Empty() bool + type ExtensionsDiff InterfaceMapDiff + func (diff *ExtensionsDiff) Empty() bool + type ExternalDocsDiff struct + Added bool + Deleted bool + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + URLDiff *ValueDiff + func (diff *ExternalDocsDiff) Empty() bool + type HeaderDiff struct + ContentDiff *ContentDiff + DeprecatedDiff *ValueDiff + DescriptionDiff *ValueDiff + ExampleDiff *ValueDiff + ExamplesDiff *ExamplesDiff + ExtensionsDiff *ExtensionsDiff + RequiredDiff *ValueDiff + SchemaDiff *SchemaDiff + func (headerDiff *HeaderDiff) Empty() bool + type HeadersDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedHeaders + func (headersDiff *HeadersDiff) Empty() bool + type IDiff interface + Empty func() bool + type InfoDiff struct + Added bool + ContactDiff *ContactDiff + Deleted bool + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + LicenseDiff *LicenseDiff + TermsOfServiceDiff *ValueDiff + TitleDiff *ValueDiff + VersionDiff *ValueDiff + func (diff *InfoDiff) Empty() bool + type InterfaceMap map[string]interface + type InterfaceMapDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedInterfaces + func (diff *InterfaceMapDiff) Empty() bool + type LicenseDiff struct + Added bool + Deleted bool + ExtensionsDiff *ExtensionsDiff + NameDiff *ValueDiff + URLDiff *ValueDiff + func (diff *LicenseDiff) Empty() bool + type LinkDiff struct + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + OperationIDDiff *ValueDiff + OperationRefDiff *ValueDiff + ParametersDiff *InterfaceMapDiff + RequestBodyDiff *ValueDiff + ServerDiff *ServerDiff + func (diff *LinkDiff) Empty() bool + type LinksDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedLinks + func (diff *LinksDiff) Empty() bool + type MediaTypeDiff struct + EncodingsDiff *EncodingsDiff + ExampleDiff *ValueDiff + ExamplesDiff *ExamplesDiff + ExtensionsDiff *ExtensionsDiff + SchemaDiff *SchemaDiff + func (diff *MediaTypeDiff) Empty() bool + type MethodDiff struct + Base *openapi3.Operation + CallbacksDiff *CallbacksDiff + DeprecatedDiff *ValueDiff + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + ExternalDocsDiff *ExternalDocsDiff + OperationIDDiff *ValueDiff + ParametersDiff *ParametersDiffByLocation + RequestBodyDiff *RequestBodyDiff + ResponsesDiff *ResponsesDiff + Revision *openapi3.Operation + SecurityDiff *SecurityRequirementsDiff + ServersDiff *ServersDiff + SummaryDiff *ValueDiff + TagsDiff *StringsDiff + func (methodDiff *MethodDiff) Empty() bool + func (methodDiff *MethodDiff) Patch(operation *openapi3.Operation) error + type ModifiedCallbacks map[string]*PathsDiff + type ModifiedEncodings map[string]*EncodingDiff + type ModifiedEndpoints map[Endpoint]*MethodDiff + func (modifiedEndpoints ModifiedEndpoints) ToEndpoints() Endpoints + type ModifiedExamples map[string]*ExampleDiff + type ModifiedHeaders map[string]*HeaderDiff + type ModifiedInterfaces map[string]*ValueDiff + func (modifiedInterfaces ModifiedInterfaces) Empty() bool + type ModifiedKeys map[string]*ValueDiff + type ModifiedLinks map[string]*LinkDiff + type ModifiedMediaTypes map[string]*MediaTypeDiff + type ModifiedOperations map[string]*MethodDiff + type ModifiedPaths map[string]*PathDiff + type ModifiedRequestBodies map[string]*RequestBodyDiff + type ModifiedResponses map[string]*ResponseDiff + type ModifiedSchemas map[string]*SchemaDiff + type ModifiedSecurityRequirements map[string]SecurityScopesDiff + type ModifiedSecuritySchemes map[string]*SecuritySchemeDiff + type ModifiedServers map[string]*ServerDiff + type ModifiedTags map[string]*TagDiff + type ModifiedVariables map[string]*VariableDiff + type OAuthFlowDiff struct + Added bool + AuthorizationURLDiff *ValueDiff + Deleted bool + ExtensionsDiff *ExtensionsDiff + RefreshURLDiff *ValueDiff + ScopesDiff *StringMapDiff + TokenURLDiff *ValueDiff + func (diff *OAuthFlowDiff) Empty() bool + type OAuthFlowsDiff struct + Added bool + AuthorizationCodeDiff *OAuthFlowDiff + ClientCredentialsDiff *OAuthFlowDiff + Deleted bool + ExtensionsDiff *ExtensionsDiff + ImplicitDiff *OAuthFlowDiff + PasswordDiff *OAuthFlowDiff + func (diff *OAuthFlowsDiff) Empty() bool + type OperationsDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedOperations + func (operationsDiff *OperationsDiff) Empty() bool + func (operationsDiff *OperationsDiff) Patch(operations map[string]*openapi3.Operation) error + type OperationsSourcesMap map[*openapi3.Operation]string + type ParamDiffByLocation map[string]ParamDiffs + type ParamDiffs map[string]*ParameterDiff + type ParamNamesByLocation map[string]utils.StringList + type ParameterDiff struct + AllowEmptyValueDiff *ValueDiff + AllowReservedDiff *ValueDiff + Base *openapi3.Parameter + ContentDiff *ContentDiff + DeprecatedDiff *ValueDiff + DescriptionDiff *ValueDiff + ExampleDiff *ValueDiff + ExamplesDiff *ExamplesDiff + ExplodeDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + InDiff *ValueDiff + NameDiff *ValueDiff + RequiredDiff *ValueDiff + Revision *openapi3.Parameter + SchemaDiff *SchemaDiff + StyleDiff *ValueDiff + func (diff *ParameterDiff) Empty() bool + func (diff *ParameterDiff) Patch(parameter *openapi3.Parameter) error + type ParametersDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ParamDiffs + func (diff *ParametersDiff) Empty() bool + type ParametersDiffByLocation struct + Added ParamNamesByLocation + Deleted ParamNamesByLocation + Modified ParamDiffByLocation + func (diff *ParametersDiffByLocation) Empty() bool + func (diff *ParametersDiffByLocation) Patch(parameters openapi3.Parameters) error + type PathDiff struct + Base *openapi3.PathItem + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + OperationsDiff *OperationsDiff + ParametersDiff *ParametersDiffByLocation + RefDiff *ValueDiff + Revision *openapi3.PathItem + ServersDiff *ServersDiff + SummaryDiff *ValueDiff + func (pathDiff *PathDiff) Empty() bool + func (pathDiff *PathDiff) Patch(pathItem *openapi3.PathItem) error + type PathParamsMap utils.StringMap + func NewPathParamsMap(pathParams1, pathParams2 []string) (PathParamsMap, bool) + func (pathParamsMap PathParamsMap) Inverse() PathParamsMap + type PathsDiff struct + Added utils.StringList + Base openapi3.Paths + Deleted utils.StringList + Modified ModifiedPaths + Revision openapi3.Paths + func (pathsDiff *PathsDiff) Empty() bool + func (pathsDiff *PathsDiff) Patch(paths openapi3.Paths) error + type RequestBodiesDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedRequestBodies + func (requestBodiesDiff *RequestBodiesDiff) Empty() bool + type RequestBodyDiff struct + Added bool + ContentDiff *ContentDiff + Deleted bool + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + RequiredDiff *ValueDiff + func (diff *RequestBodyDiff) Empty() bool + type RequiredPropertiesDiff struct + func (diff *RequiredPropertiesDiff) Empty() bool + type ResponseDiff struct + Base *openapi3.Response + ContentDiff *ContentDiff + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + HeadersDiff *HeadersDiff + LinksDiff *LinksDiff + Revision *openapi3.Response + func (diff *ResponseDiff) Empty() bool + type ResponsesDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedResponses + func (responsesDiff *ResponsesDiff) Empty() bool + type SchemaDiff struct + AdditionalPropertiesAllowedDiff *ValueDiff + AdditionalPropertiesDiff *SchemaDiff + AllOfDiff *SchemaListDiff + AllowEmptyValueDiff *ValueDiff + AnyOfDiff *SchemaListDiff + Base *openapi3.SchemaRef + CircularRefDiff bool + DefaultDiff *ValueDiff + DeprecatedDiff *ValueDiff + DescriptionDiff *ValueDiff + DiscriminatorDiff *DiscriminatorDiff + EnumDiff *EnumDiff + ExampleDiff *ValueDiff + ExclusiveMaxDiff *ValueDiff + ExclusiveMinDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + ExternalDocsDiff *ExternalDocsDiff + FormatDiff *ValueDiff + ItemsDiff *SchemaDiff + MaxDiff *ValueDiff + MaxItemsDiff *ValueDiff + MaxLengthDiff *ValueDiff + MaxPropsDiff *ValueDiff + MinDiff *ValueDiff + MinItemsDiff *ValueDiff + MinLengthDiff *ValueDiff + MinPropsDiff *ValueDiff + MultipleOfDiff *ValueDiff + NotDiff *SchemaDiff + NullableDiff *ValueDiff + OneOfDiff *SchemaListDiff + PatternDiff *ValueDiff + PropertiesDiff *SchemasDiff + ReadOnlyDiff *ValueDiff + RequiredDiff *RequiredPropertiesDiff + Revision *openapi3.SchemaRef + SchemaAdded bool + SchemaDeleted bool + TitleDiff *ValueDiff + TypeDiff *ValueDiff + UniqueItemsDiff *ValueDiff + WriteOnlyDiff *ValueDiff + XMLDiff *ValueDiff + func (diff *SchemaDiff) Empty() bool + func (diff *SchemaDiff) Patch(schema *openapi3.Schema) error + type SchemaListDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedSchemas + func (diff *SchemaListDiff) Empty() bool + type SchemasDiff struct + Added utils.StringList + Base openapi3.Schemas + Deleted utils.StringList + Modified ModifiedSchemas + Revision openapi3.Schemas + func (schemasDiff *SchemasDiff) Empty() bool + type SecurityRequirementsDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedSecurityRequirements + func (diff *SecurityRequirementsDiff) Empty() bool + type SecuritySchemeDiff struct + BearerFormatDiff *ValueDiff + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + InDiff *ValueDiff + NameDiff *ValueDiff + OAuthFlowsDiff *OAuthFlowsDiff + OpenIDConnectURLDiff *ValueDiff + SchemeDiff *ValueDiff + TypeDiff *ValueDiff + func (diff *SecuritySchemeDiff) Empty() bool + type SecuritySchemesDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedSecuritySchemes + func (diff *SecuritySchemesDiff) Empty() bool + type SecurityScopesDiff map[string]*StringsDiff + func (diff SecurityScopesDiff) Empty() bool + type ServerDiff struct + Added bool + Deleted bool + DescriptionDiff *ValueDiff + ExtensionsDiff *ExtensionsDiff + URLDiff *ValueDiff + VariablesDiff *VariablesDiff + func (diff *ServerDiff) Empty() bool + type ServersDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedServers + func (diff *ServersDiff) Empty() bool + type StringMapDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedKeys + func (diff *StringMapDiff) Empty() bool + type StringsDiff struct + Added utils.StringList + Deleted utils.StringList + func (stringsDiff *StringsDiff) Empty() bool + type Summary struct + Details map[DetailName]*SummaryDetails + Diff bool + func (summary *Summary) GetSummaryDetails(name DetailName) SummaryDetails + type SummaryDetails struct + Added int + Deleted int + Modified int + type TagDiff struct + DescriptionDiff *ValueDiff + NameDiff *ValueDiff + func (diff *TagDiff) Empty() bool + type TagsDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedTags + func (tagsDiff *TagsDiff) Empty() bool + type ValueDiff struct + From interface{} + To interface{} + func (diff *ValueDiff) Empty() bool + type VariableDiff struct + DefaultDiff *ValueDiff + DescriptionDiff *ValueDiff + EnumDiff *StringsDiff + ExtensionsDiff *ExtensionsDiff + func (diff *VariableDiff) Empty() bool + type VariablesDiff struct + Added utils.StringList + Deleted utils.StringList + Modified ModifiedVariables + func (diff *VariablesDiff) Empty() bool