Fossil SCM
Added jsonApiVersion to /json/version output.
Commit
24d830ca8aa17d72d56be20b461ace3fe434ce4f
Parent
81971c12c920b67…
2 files changed
+2
-1
+9
+2
-1
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -1899,15 +1899,16 @@ | ||
| 1899 | 1899 | FSET(MANIFEST_UUID,"manifestUuid"); |
| 1900 | 1900 | FSET(MANIFEST_VERSION,"manifestVersion"); |
| 1901 | 1901 | FSET(MANIFEST_DATE,"manifestDate"); |
| 1902 | 1902 | FSET(MANIFEST_YEAR,"manifestYear"); |
| 1903 | 1903 | FSET(RELEASE_VERSION,"releaseVersion"); |
| 1904 | -#undef FSET | |
| 1905 | 1904 | cson_object_set( jobj, "releaseVersionNumber", |
| 1906 | 1905 | cson_value_new_integer(RELEASE_VERSION_NUMBER) ); |
| 1907 | 1906 | cson_object_set( jobj, "resultCodeParanoiaLevel", |
| 1908 | 1907 | cson_value_new_integer(g.json.errorDetailParanoia) ); |
| 1908 | + FSET(FOSSIL_JSON_API_VERSION, "jsonApiVersion" ); | |
| 1909 | +#undef FSET | |
| 1909 | 1910 | return jval; |
| 1910 | 1911 | } |
| 1911 | 1912 | |
| 1912 | 1913 | |
| 1913 | 1914 | /* |
| 1914 | 1915 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1899,15 +1899,16 @@ | |
| 1899 | FSET(MANIFEST_UUID,"manifestUuid"); |
| 1900 | FSET(MANIFEST_VERSION,"manifestVersion"); |
| 1901 | FSET(MANIFEST_DATE,"manifestDate"); |
| 1902 | FSET(MANIFEST_YEAR,"manifestYear"); |
| 1903 | FSET(RELEASE_VERSION,"releaseVersion"); |
| 1904 | #undef FSET |
| 1905 | cson_object_set( jobj, "releaseVersionNumber", |
| 1906 | cson_value_new_integer(RELEASE_VERSION_NUMBER) ); |
| 1907 | cson_object_set( jobj, "resultCodeParanoiaLevel", |
| 1908 | cson_value_new_integer(g.json.errorDetailParanoia) ); |
| 1909 | return jval; |
| 1910 | } |
| 1911 | |
| 1912 | |
| 1913 | /* |
| 1914 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1899,15 +1899,16 @@ | |
| 1899 | FSET(MANIFEST_UUID,"manifestUuid"); |
| 1900 | FSET(MANIFEST_VERSION,"manifestVersion"); |
| 1901 | FSET(MANIFEST_DATE,"manifestDate"); |
| 1902 | FSET(MANIFEST_YEAR,"manifestYear"); |
| 1903 | FSET(RELEASE_VERSION,"releaseVersion"); |
| 1904 | cson_object_set( jobj, "releaseVersionNumber", |
| 1905 | cson_value_new_integer(RELEASE_VERSION_NUMBER) ); |
| 1906 | cson_object_set( jobj, "resultCodeParanoiaLevel", |
| 1907 | cson_value_new_integer(g.json.errorDetailParanoia) ); |
| 1908 | FSET(FOSSIL_JSON_API_VERSION, "jsonApiVersion" ); |
| 1909 | #undef FSET |
| 1910 | return jval; |
| 1911 | } |
| 1912 | |
| 1913 | |
| 1914 | /* |
| 1915 |
+9
| --- src/json_detail.h | ||
| +++ src/json_detail.h | ||
| @@ -17,10 +17,19 @@ | ||
| 17 | 17 | ** http://www.hwaci.com/drh/ |
| 18 | 18 | ** |
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | #include "cson_amalgamation.h" |
| 22 | + | |
| 23 | +/** | |
| 24 | + FOSSIL_JSON_API_VERSION holds the date (YYYYMMDD) of the latest | |
| 25 | + "significant" change to the JSON API (a change in an interface | |
| 26 | + or new functionality). It is sent as part of the /json/version | |
| 27 | + request. We could arguably add it to each response. | |
| 28 | +*/ | |
| 29 | +#define FOSSIL_JSON_API_VERSION "20120409" | |
| 30 | + | |
| 22 | 31 | /* |
| 23 | 32 | ** Impl details for the JSON API which need to be shared |
| 24 | 33 | ** across multiple C files. |
| 25 | 34 | */ |
| 26 | 35 | |
| 27 | 36 |
| --- src/json_detail.h | |
| +++ src/json_detail.h | |
| @@ -17,10 +17,19 @@ | |
| 17 | ** http://www.hwaci.com/drh/ |
| 18 | ** |
| 19 | */ |
| 20 | |
| 21 | #include "cson_amalgamation.h" |
| 22 | /* |
| 23 | ** Impl details for the JSON API which need to be shared |
| 24 | ** across multiple C files. |
| 25 | */ |
| 26 | |
| 27 |
| --- src/json_detail.h | |
| +++ src/json_detail.h | |
| @@ -17,10 +17,19 @@ | |
| 17 | ** http://www.hwaci.com/drh/ |
| 18 | ** |
| 19 | */ |
| 20 | |
| 21 | #include "cson_amalgamation.h" |
| 22 | |
| 23 | /** |
| 24 | FOSSIL_JSON_API_VERSION holds the date (YYYYMMDD) of the latest |
| 25 | "significant" change to the JSON API (a change in an interface |
| 26 | or new functionality). It is sent as part of the /json/version |
| 27 | request. We could arguably add it to each response. |
| 28 | */ |
| 29 | #define FOSSIL_JSON_API_VERSION "20120409" |
| 30 | |
| 31 | /* |
| 32 | ** Impl details for the JSON API which need to be shared |
| 33 | ** across multiple C files. |
| 34 | */ |
| 35 | |
| 36 |