Add REST resource providing product version
We need to create a new resource in all RESTful interfaces of GEris/GEis and also incubated project following the description provided in the following document:
[Obtain version from GEri/GEi|https://docs.google.com/document/d/1hJgawz4ibu1OBA_OlqVfZY7fzIHQ0c4vd5b-T7r2nHM/edit]
Original issue: https://jira.fiware.org/browse/SEC-1098
Add /version to the RESTful API
The API should be extended to allow a new resource GET /version
This operation lists the information of the current version of the GEri/GEi. This operation does not require a request body.
Response in JSON: Successful operation uses 200 Ok Errors use a non-2xx and optionally an error payload.
The response value should be the following one:
{noformat} { “<name of GEri/GEi>” : { “version”: “<version of the GEri/GEi> “release_date”: “uptime”: “<time in days, hours, minutes and seconds since the application was launched> “git_hash”: “hash for the current version” “doc”: “link to the API documentation in the gh-pages (*.github.io/) } }
{noformat}
Where, Name of GEri/GEi, is the official name of the GEri/GEi in lowercase. Example: orion Version, is the version of the corresponding execution of GEri/GEi, it should be presented in the releases list in github or could be a temporal release due to correction of some bugs. Example: “1.7.0” or “1.7.0-next”. The format of the version MUST be: ..[-next]
Where: MAJOR, the major number is increased when there are significant changes in functionality such as changing the framework or APIs which could cause incompatibility with interfacing systems. MINOR, the minor number is incremented when only minor functionalities in a backwards-compatible manner or significant bug fixes have been added. PATCH, the patch number is increased when you make minor bug fixes. (OPTIONAL) You can include an optional string (e.g. “-next” or “-rc”) to indicate an intermediate release version.
Release_date: I shows the date of the release in YYYY-MM-DD format. (Example: 2012-06-02 for June 2nd, 2012.) It’s international, sensible, language-independent. Uptime, is the information about the days that we have this instance up and running. In this representation we see “x d, y h, z m, t s” where x,y,z and t will be integer number. Example: "13 d, 7 h, 12 m, 14 s" Git_hash: Hash of the current version corresponding to the identification of the commit of the code in execution. Doc: link to the API documentation in the gh-pages (*.github.io/) inside the fiware organization in GitHub (e.g. Cloud Policy Manager, http://fiware.github.io/cloud.Cloto/api/v1.0/) (optional parameters)