@@ -364,6 +364,7 @@ paths:
364364 parameters :
365365 - $ref : ' #/components/parameters/XUserID'
366366 - $ref : ' #/components/parameters/XUserSignature'
367+ - $ref : ' #/components/parameters/AuthorQuery'
367368 post :
368369 summary : Create a thread
369370 requestBody :
@@ -381,6 +382,18 @@ paths:
381382 $ref : ' #/components/schemas/Thread'
382383 get :
383384 summary : List threads
385+ parameters :
386+ - $ref : ' #/components/parameters/AuthorQuery'
387+ - in : query
388+ name : title
389+ schema :
390+ type : string
391+ description : Case-insensitive substring filter on thread title
392+ - in : query
393+ name : slug
394+ schema :
395+ type : string
396+ description : Exact match on thread slug
384397 responses :
385398 " 200 " :
386399 description : OK
@@ -430,6 +443,7 @@ paths:
430443 parameters :
431444 - $ref : ' #/components/parameters/XUserID'
432445 - $ref : ' #/components/parameters/XUserSignature'
446+ - $ref : ' #/components/parameters/AuthorQuery'
433447 get :
434448 summary : Get thread metadata by ID
435449 parameters :
@@ -453,6 +467,7 @@ paths:
453467 required : true
454468 schema :
455469 type : string
470+ - $ref : ' #/components/parameters/AuthorQuery'
456471 responses :
457472 " 204 " :
458473 description : No content
@@ -609,17 +624,24 @@ components:
609624 XUserID :
610625 name : X-User-ID
611626 in : header
612- required : true
627+ required : false
613628 schema :
614629 type : string
615- description : Verified user id (provided alongside X-User-Signature)
630+ description : |
631+ Verified user id. When present this header is used alongside `X-User-Signature`
632+ for frontend-signed requests. Backend callers holding a backend/admin API key
633+ may also supply `X-User-ID` without a signature to assert an author.
616634 XUserSignature :
617635 name : X-User-Signature
618636 in : header
619- required : true
637+ required : false
620638 schema :
621639 type : string
622- description : HMAC-SHA256 signature of the `X-User-ID` computed by a backend signer.
640+ description : |
641+ HMAC-SHA256 signature of the `X-User-ID` computed by a backend signer.
642+ Required for frontend callers (who do not hold backend keys). Backend callers
643+ that possess a backend/admin API key may omit this header and instead set
644+ `X-User-ID`.
623645 AuthorQuery :
624646 name : author
625647 in : query
0 commit comments