aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-api-so-v2.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-05-30 17:48:05 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-05-30 17:48:05 +0200
commit78867fd5c3c67839116b89d636b2f191fc14f4e1 (patch)
treedb136a5d803c62a00325d3aa23489d713d8ba065 /src/afb-api-so-v2.c
parentbb5806063c450da26a38e1915f076723d00df260 (diff)
Make api descriptions unique
Before this commit, the bindings version 1 were described differently from the bindings version 2. They now all describes themselves equally using openAPI 3. Change-Id: I73c2017d0bcbf3c3b01db0c58b03e328e4f44fda Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-so-v2.c')
-rw-r--r--src/afb-api-so-v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-api-so-v2.c b/src/afb-api-so-v2.c
index 2cf181bf..76bd233b 100644
--- a/src/afb-api-so-v2.c
+++ b/src/afb-api-so-v2.c
@@ -197,7 +197,7 @@ static struct json_object *addperm_key_valint(struct json_object *o, const char
return addperm_key_val(o, key, json_object_new_int(val));
}
-static struct json_object *make_description(struct api_so_v2 *desc)
+static struct json_object *make_description_openAPIv3(struct api_so_v2 *desc)
{
char buffer[256];
const struct afb_verb_v2 *verb;
@@ -254,7 +254,7 @@ static struct json_object *describe_cb(void *closure)
struct api_so_v2 *desc = closure;
struct json_object *r = desc->binding->specification ? json_tokener_parse(desc->binding->specification) : NULL;
if (!r)
- r = make_description(desc);
+ r = make_description_openAPIv3(desc);
return r;
}