specutil

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BumpVersion

func BumpVersion(format string, file1 string, file2 string, currentVersion string) (string, error)

Types

type Diff

type Diff struct {
	OpenAPI []OpenAPIDiff
}

func DiffSpec

func DiffSpec(format string, file1 string, file2 string) (Diff, error)

func (*Diff) BreakingChangeCount

func (d *Diff) BreakingChangeCount() int

func (*Diff) MinorChangeCount

func (d *Diff) MinorChangeCount() int

func (*Diff) PatchChangeCount

func (d *Diff) PatchChangeCount() int

type OpenAPIDiff

type OpenAPIDiff struct {
	ID          string `json:"id"`
	Text        string `json:"text"`
	Level       int    `json:"level"`
	Operation   string `json:"operation"`
	OperationID string `json:"operationId"`
	Path        string `json:"path"`
	Source      string `json:"source"`
}

func DiffOpenAPI

func DiffOpenAPI(file1 string, file2 string) ([]OpenAPIDiff, error)

DiffOpenAPI compares two OAS files and returns the differences, calls the oasdiff cli tool to retrieve the json

func (*OpenAPIDiff) IsBreakingChange

func (oad *OpenAPIDiff) IsBreakingChange() bool

func (*OpenAPIDiff) IsMinorChange

func (oad *OpenAPIDiff) IsMinorChange() bool

func (*OpenAPIDiff) IsPatchChange

func (oad *OpenAPIDiff) IsPatchChange() bool

func (*OpenAPIDiff) LevelAsString

func (oad *OpenAPIDiff) LevelAsString() string

Jump to

Keyboard shortcuts

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