-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SLT-131] +X-API-Version http header, +versions.json (#3108)
* +X-API-Version http header, +versions.json * lint * switch to hard stop error upon version lookup failure * error wrap * lint * versions.json path tweak * abandoning versions.json in favor of versions.go * lint * convert json to struct * lint * lint * tests for X-API-Version header
- Loading branch information
Showing
4 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package rest | ||
|
||
// APIVersionHistory lists historical ApiVersion structs in descending chronological order (current version index 0), each containing further detail about the version. | ||
type APIVersionHistory struct { | ||
Versions []APIVersion `json:"versions"` | ||
} | ||
|
||
// APIVersion specifies the date of a particular API version along with any comments & alerts for integrators to review. | ||
type APIVersion struct { | ||
Version string `json:"version"` | ||
Date string `json:"date"` | ||
Comments string `json:"comments"` | ||
Alerts string `json:"alerts"` | ||
} | ||
|
||
// APIversions contains version information for the Synapse RFQ API. Deprecation notices & other alerts, if any, will be listed here. | ||
// Note: Items must be listed in descending chronological order (current version index 0). | ||
var APIversions = APIVersionHistory{ | ||
Versions: []APIVersion{ | ||
{ | ||
Version: "1.0", | ||
Date: "2024-01-01", | ||
Comments: "", | ||
Alerts: "", | ||
}, | ||
}, | ||
} |