From 73ef0570fd9b78a94c2ad263556279f60f378d99 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 29 Mar 2020 17:03:08 +0200 Subject: [PATCH] make config fields exported in Go (capitalize) --- api.json | 80 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/api.json b/api.json index d02aa2d..7f32433 100644 --- a/api.json +++ b/api.json @@ -7,7 +7,7 @@ "info": "returns the list of existing users", "in": {}, "out": { - "users": { "info": "users list", "type": "any" } + "users": { "info": "users list", "type": "any", "name": "Users" } } }, { @@ -16,14 +16,14 @@ "scope": [], "info": "returns info about an existing user", "in": { - "{id}": { "info": "the target user id", "name": "user_id", "type": "uint" } + "{id}": { "info": "the target user id", "name": "ID", "type": "uint" } }, "out": { - "id": { "info": "user id", "type": "uint" }, - "username": { "info": "username", "type": "string(3,30)" }, - "firstname": { "info": "first name", "type": "string(1,30)" }, - "lastname": { "info": "last name", "type": "string(1,30)" }, - "articles": { "info": "user articles", "type": "any" } + "id": { "info": "user id", "type": "uint", "name": "ID" }, + "username": { "info": "username", "type": "string(3,30)", "name": "Username" }, + "firstname": { "info": "first name", "type": "string(1,30)", "name": "Firstname" }, + "lastname": { "info": "last name", "type": "string(1,30)", "name": "Lastname" }, + "articles": { "info": "user articles", "type": "any", "name": "Articles" } } }, @@ -33,15 +33,15 @@ "scope": [["admin"]], "info": "creates a new user", "in": { - "username": { "info": "username", "type": "string(3,30)" }, - "firstname": { "info": "first name", "type": "string(1,30)" }, - "lastname": { "info": "last name", "type": "string(1,30)" } + "username": { "info": "username", "type": "string(3,30)", "name": "Username" }, + "firstname": { "info": "first name", "type": "string(1,30)", "name": "Firstname" }, + "lastname": { "info": "last name", "type": "string(1,30)", "name": "Lastname" } }, "out": { - "id": { "info": "new user's id", "type": "uint" }, - "username": { "info": "new user's username", "type": "string(3,30)" }, - "firstname": { "info": "new user's first name", "type": "string(1,30)" }, - "lastname": { "info": "new user's last name", "type": "string(1,30)" } + "id": { "info": "user id", "type": "uint", "name": "ID" }, + "username": { "info": "username", "type": "string(3,30)", "name": "Username" }, + "firstname": { "info": "first name", "type": "string(1,30)", "name": "Firstname" }, + "lastname": { "info": "last name", "type": "string(1,30)", "name": "Lastname" } } }, { @@ -50,16 +50,16 @@ "scope": [["admin"], ["self"]], "info": "updates an existing user", "in": { - "{id}": { "info": "the target user id", "type": "uint", "name": "user_id" }, - "username": { "info": "updated username", "type": "?string(3,30)" }, - "firstname": { "info": "updated first name", "type": "?string(1,30)" }, - "lastname": { "info": "updated last name", "type": "?string(1,30)" } + "{id}": { "info": "the target user id", "type": "uint", "name": "ID" }, + "username": { "info": "updated username", "type": "?string(3,30)", "name": "Username" }, + "firstname": { "info": "updated first name", "type": "?string(1,30)", "name": "Firstname" }, + "lastname": { "info": "updated last name", "type": "?string(1,30)", "name": "Lastname" } }, "out": { - "id": { "info": "new user's id", "type": "uint" }, - "username": { "info": "new user's username", "type": "string(3,30)" }, - "firstname": { "info": "new user's first name", "type": "string(1,30)" }, - "lastname": { "info": "new user's last name", "type": "string(1,30)" } + "id": { "info": "user id", "type": "uint", "name": "ID" }, + "username": { "info": "username", "type": "string(3,30)", "name": "Username" }, + "firstname": { "info": "first name", "type": "string(1,30)", "name": "Firstname" }, + "lastname": { "info": "last name", "type": "string(1,30)", "name": "Lastname" } } }, @@ -69,7 +69,7 @@ "scope": [["admin"], ["self"]], "info": "deletes an existing user", "in": { - "{id}": { "info": "the target user id", "name": "user_id", "type": "uint" } + "{id}": { "info": "the target user id", "name": "ID", "type": "uint" } }, "out": {} }, @@ -83,10 +83,10 @@ "scope": [[]], "info": "returns the list of existing articles a user wrote", "in": { - "{id}": { "info": "author user id", "name": "author_id", "type": "uint" } + "{id}": { "info": "author user id", "name": "ID", "type": "uint" } }, "out": { - "articles": { "info": "articles list", "type": "any" } + "articles": { "info": "articles list", "type": "any", "name": "Articles" } } }, @@ -97,7 +97,7 @@ "info": "returns the list of existing articles", "in": {}, "out": { - "articles": { "info": "articles list", "type": "any" } + "articles": { "info": "articles list", "type": "any", "name": "Articles" } } }, { "method": "GET", @@ -105,14 +105,14 @@ "scope": [[]], "info": "returns an existing article", "in": { - "{id}": { "info": "the target article id", "name": "article_id", "type": "uint" } + "{id}": { "info": "the target article id", "name": "ID", "type": "uint" } }, "out": { - "id": { "info": "the article id", "type": "uint" }, - "title": { "info": "the article title", "type": "string(5,255)" }, - "body": { "info": "the article body", "type": "string" }, - "author": { "info": "the author user id", "type": "uint" }, - "score": { "info": "absolute vote score", "type": "uint" } + "id": { "info": "the article id", "type": "uint", "name": "ID" }, + "title": { "info": "the article title", "type": "string(5,255)", "name": "Title" }, + "body": { "info": "the article body", "type": "string", "name": "Body" }, + "author": { "info": "the author user id", "type": "uint", "name": "Author" }, + "score": { "info": "absolute vote score", "type": "uint", "name": "Score" } } }, { "method": "POST", @@ -120,15 +120,15 @@ "scope": [["author"]], "info": "post a new article", "in": { - "title": { "info": "the article title", "type": "string(5,255)" }, - "body": { "info": "the article body", "type": "string" } + "title": { "info": "the article title", "type": "string(5,255)", "name": "Title" }, + "body": { "info": "the article body", "type": "string", "name": "Body" } }, "out": { - "id": { "info": "the article id", "type": "uint" }, - "title": { "info": "the article title", "type": "string(5,255)" }, - "body": { "info": "the article body", "type": "string" }, - "author": { "info": "the author user id", "type": "uint" }, - "score": { "info": "absolute vote score", "type": "uint" } + "id": { "info": "the article id", "type": "uint", "name": "ID" }, + "title": { "info": "the article title", "type": "string(5,255)", "name": "Title" }, + "body": { "info": "the article body", "type": "string", "name": "Body" }, + "author": { "info": "the author user id", "type": "uint", "name": "Author" }, + "score": { "info": "absolute vote score", "type": "uint", "name": "Score" } } }, { "method": "DELETE", @@ -136,7 +136,7 @@ "scope": [["admin"], ["author"]], "info": "deletes an article", "in": { - "{id}": { "info": "the target article id", "name": "article_id", "type": "uint" } + "{id}": { "info": "the target article id", "name": "ID", "type": "uint" } }, "out": { } }