Documentation
¶
Index ¶
- type Change
- type Changelog
- type Entry
- func NewEntries(basePath, revisionPath, exceptionFilePath string) ([]*Entry, error)
- func NewEntriesBetweenRevisionVersions(revisionPath, exceptionFilePath string) ([]*Entry, error)
- func NewEntriesBetweenRevisionVersionsWithRunDate(revisionPath, exceptionFilePath, runDate string) ([]*Entry, error)
- func NewEntriesFromPath(path string) ([]*Entry, error)
- func NewEntriesWithRunDate(basePath, revisionPath, exceptionFilePath, runDate string) ([]*Entry, error)
- func NewEntriesWithoutHidden(basePath, revisionPath, exceptionFilePath string) ([]*Entry, error)
- func NewEntriesWithoutHiddenWithRunDate(basePath, revisionPath, exceptionFilePath, runDate string) ([]*Entry, error)
- func NewNotHiddenEntries(changelog []*Entry) ([]*Entry, error)
- type Metadata
- type Path
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changelog ¶
type Changelog struct {
BaseMetadata *Metadata
RevisionMetadata *Metadata
Base *load.SpecInfo // the base spec to compare against the revision
Revision *load.SpecInfo // the new spec to compare against the base
BaseChangelog []*Entry
Config *checker.Config
OasDiff *openapi.OasDiff
ExemptionFilePath string
RunDate string
}
func (*Changelog) NewEntriesFromSunsetAndManualEntry ¶
NewEntriesFromSunsetAndManualEntry merges the base changelog with the new changes from manual entries and sunset endpoints.
type Entry ¶
type Entry struct {
Date string `json:"date"`
Paths []*Path `json:"paths"`
FromVersion string `json:"fromVersion,omitempty"`
ToVersion string `json:"toVersion,omitempty"`
}
func NewEntries ¶
NewEntries generates the changelog entries between the base and revision specs. The returned entries includes all the changes between the base and revision specs included the one marked as hidden.
func NewEntriesBetweenRevisionVersions ¶
NewEntriesBetweenRevisionVersions generates the changelog entries between the revision versions.
func NewEntriesBetweenRevisionVersionsWithRunDate ¶
func NewEntriesBetweenRevisionVersionsWithRunDate(revisionPath, exceptionFilePath, runDate string) ([]*Entry, error)
NewEntriesBetweenRevisionVersionsWithRunDate generates the changelog entries between the revision versions with a specific run date.
func NewEntriesFromPath ¶
func NewEntriesWithRunDate ¶
func NewEntriesWithRunDate(basePath, revisionPath, exceptionFilePath, runDate string) ([]*Entry, error)
NewEntriesWithRunDate generates the changelog entries with a specific run date.
func NewEntriesWithoutHidden ¶
NewEntriesWithoutHidden generates the changelog entries between the base and revision specs. The returned entries includes the changes between the base and revision specs that are not marked as hidden.
func NewEntriesWithoutHiddenWithRunDate ¶
func NewEntriesWithoutHiddenWithRunDate(basePath, revisionPath, exceptionFilePath, runDate string) ([]*Entry, error)
NewEntriesWithoutHiddenWithRunDate generates the changelog entries with a specific run date.
func NewNotHiddenEntries ¶
NewNotHiddenEntries returns the entries that are not hidden from the changelog. Logic: Gets the last changelog date entry at index 0 and: 1. Remove all entries with hideFromChangelog 2. Remove all empty versions 3. Remove all empty paths 4. Shift changelog entry if it turns out empty.
type Path ¶
type Path struct {
URI string `json:"path"`
HTTPMethod string `json:"httpMethod"`
Versions []*Version `json:"versions,omitempty"`
OperationID string `json:"operationId"`
Tag string `json:"tag"`
StabilityLevel string `json:"stabilityLevel,omitempty"`
ChangeType string `json:"changeType,omitempty"`
Changes []*Change `json:"changes,omitempty"`
}