Fossil SCM

Added jsonApiVersion to /json/version output.

stephan 2012-03-09 18:43 trunk
Commit 24d830ca8aa17d72d56be20b461ace3fe434ce4f
2 files changed +2 -1 +9
+2 -1
--- src/json.c
+++ src/json.c
@@ -1899,15 +1899,16 @@
18991899
FSET(MANIFEST_UUID,"manifestUuid");
19001900
FSET(MANIFEST_VERSION,"manifestVersion");
19011901
FSET(MANIFEST_DATE,"manifestDate");
19021902
FSET(MANIFEST_YEAR,"manifestYear");
19031903
FSET(RELEASE_VERSION,"releaseVersion");
1904
-#undef FSET
19051904
cson_object_set( jobj, "releaseVersionNumber",
19061905
cson_value_new_integer(RELEASE_VERSION_NUMBER) );
19071906
cson_object_set( jobj, "resultCodeParanoiaLevel",
19081907
cson_value_new_integer(g.json.errorDetailParanoia) );
1908
+ FSET(FOSSIL_JSON_API_VERSION, "jsonApiVersion" );
1909
+#undef FSET
19091910
return jval;
19101911
}
19111912
19121913
19131914
/*
19141915
--- 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
--- src/json_detail.h
+++ src/json_detail.h
@@ -17,10 +17,19 @@
1717
** http://www.hwaci.com/drh/
1818
**
1919
*/
2020
2121
#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
+
2231
/*
2332
** Impl details for the JSON API which need to be shared
2433
** across multiple C files.
2534
*/
2635
2736
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button