Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeKind ¶
type ChangeKind string
const ( OperationAdded ChangeKind = "operation_added" OperationRemoved ChangeKind = "operation_removed" ParameterAdded ChangeKind = "parameter_added" ParameterRemoved ChangeKind = "parameter_removed" ParameterTypeChanged ChangeKind = "parameter_type_changed" ParameterRequiredChanged ChangeKind = "parameter_required_changed" ResponseAdded ChangeKind = "response_added" // status code ResponseRemoved ChangeKind = "response_removed" SchemaAdded ChangeKind = "schema_added" SchemaRemoved ChangeKind = "schema_removed" PropertyAdded ChangeKind = "property_added" PropertyRemoved ChangeKind = "property_removed" PropertyTypeChanged ChangeKind = "property_type_changed" PropertyRenamed ChangeKind = "property_renamed" RequiredAdded ChangeKind = "required_added" RequiredRemoved ChangeKind = "required_removed" )
type Direction ¶
type Direction int
Direction is where a schema sits on the contract: client->server or server->client.
type Report ¶
type Report struct{ Changes []Change }
func Diff ¶
Diff compares two CANONICAL documents (a=published, b=code). Detection is symmetric; direction only affects how severe a found change is.
type Target ¶
type Target struct {
// schema-property changes
Schema string
Direction Direction
Property string
// operation / parameter / response changes
Method string
Path string
ParamName string
ParamIn string
StatusCode string
}
Target is the machine-addressable location of a change, so downstream (patch) never parses the human-readable Location string. Fields are populated per change kind; unused ones stay zero.
Click to show internal directories.
Click to hide internal directories.