Skip to content

Commit

Permalink
API spec: record method, some responses
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Sep 12, 2024
1 parent 0025466 commit ccc05a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions etc/apifunctions.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{
"name": "comment", "paper": true, "post": true,
"function": "Comment_API::run",
"parameters": "c ?override ?=text ?=response ?=ready ?=topic ?=draft ?=blind ?=tags ?=visibility ?=:attachment ?=by_author ?=review_token"
"parameters": "c ?override ?=text ?=response ?=ready ?=topic ?=draft ?=blind ?=tags ?=visibility ?=:attachment ?=by_author ?=review_token ?delete"
},
{
"name": "declinereview", "post": true, "redirect": true,
Expand Down Expand Up @@ -221,12 +221,14 @@
},
{
"name": "session", "get": true, "allow_disabled": true,
"function": "Session_API::getsession"
"function": "Session_API::getsession",
"response": "postvalue sessioninfo"
},
{
"name": "session", "post": true,
"function": "Session_API::setsession",
"parameters": "v"
"parameters": "v",
"response": "postvalue sessioninfo"
},
{
"name": "settags", "alias": "tags"
Expand Down
4 changes: 2 additions & 2 deletions src/api/api_specvalidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ static function error(Qrequest $qreq, $error) {
$url = substr($nav->self(), 0, 100);
$out = $qreq->conf()->opt("validateApiSpec");
if (is_string($out)) {
@file_put_contents($out, "{$url}: {$error}\n", FILE_APPEND);
@file_put_contents($out, "{$qreq->method()} {$url}: {$error}\n", FILE_APPEND);
} else {
error_log("{$url}: {$error}");
error_log("{$qreq->method()} {$url}: {$error}");
}
}
}

0 comments on commit ccc05a4

Please sign in to comment.