Report semantic version of OpenBEL API
Closed this issue · 1 comments
abargnesi commented
The OpenBEL API should report the API version. The API is not stable yet so this should reflect the 0.x.x series. Until 1.x.x we should expect breaking changes to be possible as it evolves.
The API version uses Semantic Versioning so it's reasonable to report both a version string and granular structure. Something like:
With Accept: text/plain
or ?format=text
0.5.0
With Accept: application/json
or ?format=json
{
"version": {
"string": "0.5.0",
"major": "0",
"minor": "5",
"patch": "0"
}
}
abargnesi commented
Added GET /api/version
that reports the semantic version of the OpenBEL API. It supports JSON or TEXT depending on Accept
header or ?format=json|text
query parameter.
Added -v
and --version
options to openbel-api
and openbel-config
commands.