github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/codegen/simplesearch.yml (about) 1 swagger: '2.0' 2 3 info: 4 version: "1.0.0" 5 title: Simple Search API 6 description: | 7 A very simple api description that makes a x-www-form-urlencoded only API to submit searches. 8 9 tags: 10 - name: search 11 - name: tasks 12 13 produces: 14 - application/json 15 16 consumes: 17 - application/json 18 19 paths: 20 /search: 21 post: 22 operationId: search 23 summary: searches tasks 24 description: searches the task titles and descriptions for a match 25 consumes: 26 - application/x-www-form-urlencoded 27 tags: 28 - search 29 parameters: 30 - name: q 31 in: formData 32 type: string 33 description: the search string 34 required: true 35 responses: 36 default: 37 description: Generic Error 38 /tasks: 39 get: 40 operationId: getTasks 41 summary: Gets `Task` objects. 42 description: | 43 Optional query param of **size** determines 44 size of returned array 45 tags: 46 - tasks 47 parameters: 48 - name: size 49 in: query 50 description: Size of task list 51 type: integer 52 format: int32 53 default: 20 54 - name: completed 55 in: query 56 description: when true shows completed tasks 57 type: boolean 58 59 responses: 60 default: 61 description: Generic Error 62 200: 63 description: Successful response 64 headers: 65 X-Rate-Limit: 66 type: integer 67 format: int32 68 X-Rate-Limit-Remaining: 69 type: integer 70 format: int32 71 default: 42 72 X-Rate-Limit-Reset: 73 type: integer 74 format: int32 75 default: 1449875311 76 X-Rate-Limit-Reset-Human: 77 type: string 78 default: 3 days 79 X-Rate-Limit-Reset-Human-Number: 80 type: string 81 default: "3" 82 Access-Control-Allow-Origin: 83 type: string 84 default: "*" 85 schema: 86 type: array 87 items: 88 $ref: "#/definitions/Task" 89 post: 90 operationId: createTask 91 summary: Creates a 'Task' object. 92 description: | 93 Validates the content property for length etc. 94 parameters: 95 - name: body 96 in: body 97 schema: 98 $ref: "#/definitions/Task" 99 tags: 100 - tasks 101 responses: 102 default: 103 description: Generic Error 104 201: 105 description: Task Created 106 107 /tasks/{id}: 108 parameters: 109 - name: id 110 in: path 111 type: integer 112 format: int32 113 description: The id of the task 114 required: true 115 minimum: 1 116 put: 117 operationId: updateTask 118 summary: updates a task. 119 description: | 120 Validates the content property for length etc. 121 tags: 122 - tasks 123 parameters: 124 - name: body 125 in: body 126 description: the updated task 127 schema: 128 $ref: "#/definitions/Task" 129 responses: 130 default: 131 description: Generic Error 132 200: 133 description: Task updated 134 schema: 135 $ref: "#/definitions/Task" 136 delete: 137 operationId: deleteTask 138 summary: deletes a task 139 description: | 140 Deleting a task is irrevocable. 141 tags: 142 - tasks 143 responses: 144 default: 145 description: Generic Error 146 204: 147 description: Task Deleted 148 149 150 definitions: 151 Task: 152 title: A Task object 153 description: | 154 This describes a task. Tasks require a content property to be set. 155 required: 156 - content 157 type: object 158 properties: 159 id: 160 title: the unique id of the task 161 description: | 162 This id property is autogenerated when a task is created. 163 type: integer 164 format: int64 165 readOnly: true 166 content: 167 title: The content of the task 168 description: | 169 Task content can contain [GFM](https://help.github.com/articles/github-flavored-markdown/). 170 type: string 171 minLength: 5 172 completed: 173 title: when true this task is completed 174 type: boolean 175 creditcard: 176 title: the credit card format usage 177 type: string 178 format: creditcard 179 createdAt: 180 title: task creation time 181 type: string 182 format: date-time 183 readOnly: true