add first commit

This commit is contained in:
2026-07-22 17:15:16 +08:00
commit 8a20a14123
13 changed files with 188 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# add 接口 — 按请求类型分节
# subject 会带上方法后缀: example.add.GET / example.add.POST
[GET]
cacheable = true
summary = "Add two numbers"
docstring = "Add two numbers via GET query params"
params = ["a: float", "b: float"]
auth_required = false
[GET.response_model]
result = { type = "float", required = true }
operation = { type = "str", default = "add" }
timestamp = { type = "float", required = false, default = 0.0 }
[POST]
cacheable = true
summary = "Add two numbers (POST)"
docstring = "Add two numbers via POST JSON body"
params = ["a: float", "b: float"]
[POST.response_model]
result = { type = "float", required = true }
operation = { type = "str", default = "add" }
timestamp = { type = "float", required = false, default = 0.0 }