mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Large refactor and addedGetAllChanges to each change
tons of updates, so many things.
This commit is contained in:
@@ -22,6 +22,22 @@ type SecuritySchemeChanges struct {
|
||||
ScopesChanges *ScopesChanges `json:"scopes,omitempty" yaml:"scopes,omitempty"`
|
||||
}
|
||||
|
||||
// GetAllChanges returns a slice of all changes made between SecurityRequirement objects
|
||||
func (ss *SecuritySchemeChanges) GetAllChanges() []*Change {
|
||||
var changes []*Change
|
||||
changes = append(changes, ss.Changes...)
|
||||
if ss.OAuthFlowChanges != nil {
|
||||
changes = append(changes, ss.OAuthFlowChanges.GetAllChanges()...)
|
||||
}
|
||||
if ss.ScopesChanges != nil {
|
||||
changes = append(changes, ss.ScopesChanges.GetAllChanges()...)
|
||||
}
|
||||
if ss.ExtensionChanges != nil {
|
||||
changes = append(changes, ss.ExtensionChanges.GetAllChanges()...)
|
||||
}
|
||||
return changes
|
||||
}
|
||||
|
||||
// TotalChanges represents total changes found between two Swagger or OpenAPI SecurityScheme instances.
|
||||
func (ss *SecuritySchemeChanges) TotalChanges() int {
|
||||
c := ss.PropertyChanges.TotalChanges()
|
||||
|
||||
Reference in New Issue
Block a user