Skip to content

Commit

Permalink
Fix Server Capability V5 Type Minor version (#7598)
Browse files Browse the repository at this point in the history
* Fix Type Minor version

* Fix Type Minor version + CHANGELOG.md
  • Loading branch information
jagan-parthiban authored Jun 26, 2023
1 parent 4ea0458 commit b820264
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7469](https://github.com/apache/trafficcontrol/pull/7469) *Traffic Ops* Changed logic to not report empty or missing cookies into TO error.log.

### Fixed
- [#7598](https://github.com/apache/trafficcontrol/pull/7598) *Traffic Ops* Fixes Server Capability V5 Type Name Minor version
- [#7570](https://github.com/apache/trafficcontrol/pull/7570) *Traffic Ops* Fixes `deliveryservice_request_comments` v5 apis to respond with `RFC3339` date/time Format.
- [#7312](https://github.com/apache/trafficcontrol/issues/7312) *Docs* Changing docs for CDN locks for DELETE response structure v4 and v5.
- [#7572](https://github.com/apache/trafficcontrol/pull/7572) *Traffic Ops* Fixes Delivery Service Requests V5 apis docs with RFC3339 date/time Format
Expand Down
18 changes: 9 additions & 9 deletions lib/go-tc/server_capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,29 @@ type ServerCapabilityDetailResponseV41 struct {
}

// ServerCapabilityV5 is an alias for the latest minor version for the major version 5.
type ServerCapabilityV5 ServerCapabilityV51
type ServerCapabilityV5 ServerCapabilityV50

// ServerCapabilityV51 contains information about a given serverCapability in Traffic Ops V5.
type ServerCapabilityV51 struct {
// ServerCapabilityV50 contains information about a given serverCapability in Traffic Ops V5.
type ServerCapabilityV50 struct {
Name string `json:"name" db:"name"`
LastUpdated time.Time `json:"lastUpdated" db:"last_updated"`
Description string `json:"description" db:"description"`
}

// ServerCapabilitiesResponseV5 is an alias for the latest minor version for the major version 5.
type ServerCapabilitiesResponseV5 ServerCapabilitiesResponseV51
type ServerCapabilitiesResponseV5 ServerCapabilitiesResponseV50

// ServerCapabilitiesResponseV51 contains the result data from a GET(v5.1 and above) /server_capabilities request.
type ServerCapabilitiesResponseV51 struct {
// ServerCapabilitiesResponseV50 contains the result data from a GET(v5.1 and above) /server_capabilities request.
type ServerCapabilitiesResponseV50 struct {
Response []ServerCapabilityV5 `json:"response"`
Alerts
}

// ServerCapabilityDetailResponseV5 is an alias for the latest minor version for the major version 5.
type ServerCapabilityDetailResponseV5 ServerCapabilityDetailResponseV51
type ServerCapabilityDetailResponseV5 ServerCapabilityDetailResponseV50

// ServerCapabilityDetailResponseV51 contains the result data from a POST(v5.1 and above) /server_capabilities request.
type ServerCapabilityDetailResponseV51 struct {
// ServerCapabilityDetailResponseV50 contains the result data from a POST(v5.1 and above) /server_capabilities request.
type ServerCapabilityDetailResponseV50 struct {
Response ServerCapabilityV5 `json:"response"`
Alerts
}

0 comments on commit b820264

Please sign in to comment.