A platform for community discussion. Free, open, simple.
api docs example (#11997)
Blake Erickson8a001c2fe3f9
diff --git a/spec/requests/api/schemas/json/admin_user_list_response.json b/spec/requests/api/schemas/json/admin_user_list_response.jsonindex 926cb8a1f35..075318ac728 100644--- a/spec/requests/api/schemas/json/admin_user_list_response.json+++ b/spec/requests/api/schemas/json/admin_user_list_response.json@@ -1,7 +1,7 @@{"type": "array","minItems": 1,- "uniqItems": true,+ "uniqueItems": true,"items": {"type": "object","properties": {diff --git a/spec/requests/api/schemas/json/backups_list_response.json b/spec/requests/api/schemas/json/backups_list_response.jsonindex 5c24391e04c..f6e54fb8542 100644--- a/spec/requests/api/schemas/json/backups_list_response.json+++ b/spec/requests/api/schemas/json/backups_list_response.json@@ -1,7 +1,7 @@{"type": "array","minItems": 1,- "uniqItems": true,+ "uniqueItems": true,"items": {"type": "object","properties": {diff --git a/spec/swagger_helper.rb b/spec/swagger_helper.rbindex 4f577fd697f..db3de327c60 100644--- a/spec/swagger_helper.rb+++ b/spec/swagger_helper.rb@@ -50,20 +50,20 @@ def api_docs_descriptionas an HTTP header like this:```- curl -X GET "http://127.0.0.1:3000/admin/users/list/active.json" \- -H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \+ curl -X GET "http://127.0.0.1:3000/admin/users/list/active.json" \\+ -H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \\-H "Api-Username: system"```and this is how POST requests will look:```- curl -X POST "http://127.0.0.1:3000/categories" \- -H "Content-Type: multipart/form-data;" \- -H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \- -H "Api-Username: system" \- -F "name=89853c20-4409-e91a-a8ea-f6cdff96aaaa" \- -F "color=49d9e9" \+ curl -X POST "http://127.0.0.1:3000/categories" \\+ -H "Content-Type: multipart/form-data;" \\+ -H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \\+ -H "Api-Username: system" \\+ -F "name=89853c20-4409-e91a-a8ea-f6cdff96aaaa" \\+ -F "color=49d9e9" \\-F "text_color=f0fcfd"```