changelog

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Description        string `json:"change"`
	Code               string `json:"changeCode"`
	BackwardCompatible bool   `json:"backwardCompatible"`
	HideFromChangelog  bool   `json:"hideFromChangelog,omitempty"`
}

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

func (m *Changelog) NewEntriesFromSunsetAndManualEntry() ([]*Entry, error)

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

func NewEntries(basePath, revisionPath, exceptionFilePath string) ([]*Entry, error)

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

func NewEntriesBetweenRevisionVersions(revisionPath, exceptionFilePath string) ([]*Entry, error)

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 NewEntriesFromPath(path string) ([]*Entry, error)

func NewEntriesWithRunDate

func NewEntriesWithRunDate(basePath, revisionPath, exceptionFilePath, runDate string) ([]*Entry, error)

NewEntriesWithRunDate generates the changelog entries with a specific run date.

func NewEntriesWithoutHidden

func NewEntriesWithoutHidden(basePath, revisionPath, exceptionFilePath string) ([]*Entry, error)

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

func NewNotHiddenEntries(changelog []*Entry) ([]*Entry, error)

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 Metadata

type Metadata struct {
	Path              string   `json:"path,omitempty"`
	ActiveVersion     string   `json:"activeVersion,omitempty"`
	RunDate           string   `json:"runDate"`
	SpecRevision      string   `json:"specRevision,omitempty"`
	SpecRevisionShort string   `json:"specRevisionShort,omitempty"`
	Versions          []string `json:"versions"`
}

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"`
}

type Version

type Version struct {
	Version        string    `json:"version"`
	Changes        []*Change `json:"changes"`
	StabilityLevel string    `json:"stabilityLevel"`
	ChangeType     string    `json:"changeType"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL