aboutsummaryrefslogtreecommitdiff
path: root/test_api
diff options
context:
space:
mode:
authorGuillaume Pasquet <dev@etenil.net>2022-02-24 23:39:33 +0000
committerGuillaume Pasquet <dev@etenil.net>2022-02-24 23:39:33 +0000
commit3517f9d9ff69eebae14e32a3b1550bd920ea3238 (patch)
treeb56d16e0b757bc8868e9f49a7cc20c0ae546c6ad /test_api
parent649299965d2368f65b45d7f51b89eb69b491c7a4 (diff)
Fix #5: Add JSON syntax coloring
Diffstat (limited to 'test_api')
-rw-r--r--test_api/test_api.py8
-rw-r--r--test_api/test_api_get_long.barb2
2 files changed, 10 insertions, 0 deletions
diff --git a/test_api/test_api.py b/test_api/test_api.py
index bd8303d..cce55f4 100644
--- a/test_api/test_api.py
+++ b/test_api/test_api.py
@@ -4,6 +4,14 @@ from bottle import get, post, run, HTTPError
def get_root():
return {"status": "OK"}
+@get("/long")
+def get_long():
+ return {"data": [
+ {"name": "apple", "calories": 5},
+ {"name": "orange", "calories": 120},
+ {"name": "pear", "calories": 45},
+ ]}
+
@post("/")
def post_root():
return {"status": "SUCCESS"}
diff --git a/test_api/test_api_get_long.barb b/test_api/test_api_get_long.barb
new file mode 100644
index 0000000..96133b3
--- /dev/null
+++ b/test_api/test_api_get_long.barb
@@ -0,0 +1,2 @@
+#GET^http://localhost:8080/long
+#Foo: Bar