Skip to content

Commit

Permalink
(chore/api) update api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Oct 10, 2024
1 parent dad7d64 commit 5b11e4c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 7 additions & 1 deletion web/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const docTemplate = `{
"summary": "Search for results",
"parameters": [
{
"description": "The search term to search for. Supports search operators: ` + "`" + `title:` + "`" + `, ` + "`" + `tech:` + "`" + `, ` + "`" + `header:` + "`" + `",
"description": "The search term to search for. Supports search operators: ` + "`" + `title:` + "`" + `, ` + "`" + `tech:` + "`" + `, ` + "`" + `header:` + "`" + `, ` + "`" + `body:` + "`" + `, ` + "`" + `p:` + "`" + `",
"name": "query",
"in": "body",
"required": true,
Expand Down Expand Up @@ -390,6 +390,9 @@ const docTemplate = `{
"response_code": {
"type": "integer"
},
"screenshot": {
"type": "string"
},
"technologies": {
"type": "array",
"items": {
Expand Down Expand Up @@ -504,6 +507,9 @@ const docTemplate = `{
"response_reason": {
"type": "string"
},
"screenshot": {
"type": "string"
},
"title": {
"type": "string"
},
Expand Down
8 changes: 7 additions & 1 deletion web/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"summary": "Search for results",
"parameters": [
{
"description": "The search term to search for. Supports search operators: `title:`, `tech:`, `header:`",
"description": "The search term to search for. Supports search operators: `title:`, `tech:`, `header:`, `body:`, `p:`",
"name": "query",
"in": "body",
"required": true,
Expand Down Expand Up @@ -379,6 +379,9 @@
"response_code": {
"type": "integer"
},
"screenshot": {
"type": "string"
},
"technologies": {
"type": "array",
"items": {
Expand Down Expand Up @@ -493,6 +496,9 @@
"response_reason": {
"type": "string"
},
"screenshot": {
"type": "string"
},
"title": {
"type": "string"
},
Expand Down
6 changes: 5 additions & 1 deletion web/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ definitions:
type: string
response_code:
type: integer
screenshot:
type: string
technologies:
items:
type: string
Expand Down Expand Up @@ -91,6 +93,8 @@ definitions:
type: integer
response_reason:
type: string
screenshot:
type: string
title:
type: string
url:
Expand Down Expand Up @@ -491,7 +495,7 @@ paths:
description: Searches for results based on free form text, or operators.
parameters:
- description: 'The search term to search for. Supports search operators: `title:`,
`tech:`, `header:`'
`tech:`, `header:`, `body:`, `p:`'
in: body
name: query
required: true
Expand Down

0 comments on commit 5b11e4c

Please sign in to comment.