github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/codegen/todolist.bodyparams.yml (about) 1 swagger: '2.0' 2 3 info: 4 version: "1.0.0" 5 title: Private to-do list 6 description: | 7 A very simple api description that makes a json only API to submit to do's. 8 9 produces: 10 - application/json 11 12 consumes: 13 - application/json 14 15 paths: 16 /tasks: 17 post: 18 operationId: createTask 19 summary: Creates a 'Task' object. 20 description: | 21 Validates the content property for length etc. 22 parameters: 23 - name: body 24 in: body 25 schema: 26 type: object 27 required: 28 - content 29 properties: 30 content: 31 title: The content of the task 32 description: | 33 Task content can contain [GFM](https://help.github.com/articles/github-flavored-markdown/). 34 type: string 35 minLength: 5 36 completed: 37 title: when true this task is completed 38 type: boolean 39 creditcard: 40 title: the credit card format usage 41 type: string 42 format: creditcard 43 responses: 44 default: 45 description: Generic Error 46 201: 47 description: Task Created 48 49 /tasks/{id}: 50 put: 51 operationId: updateTask 52 summary: updates a task. 53 description: | 54 Validates the content property for length etc. 55 tags: 56 - tasks 57 parameters: 58 - name: id 59 in: path 60 required: true 61 type: integer 62 - name: body 63 in: body 64 description: the updated task 65 schema: 66 $ref: "#/definitions/Task" 67 responses: 68 default: 69 description: Generic Error 70 200: 71 description: Task updated 72 schema: 73 $ref: "#/definitions/Task" 74 75 76 definitions: 77 Task: 78 title: A Task object 79 description: | 80 This describes a task. Tasks require a content property to be set. 81 required: 82 - content 83 type: object 84 properties: 85 id: 86 title: the unique id of the task 87 description: | 88 This id property is autogenerated when a task is created. 89 type: integer 90 format: int64 91 readOnly: true 92 content: 93 title: The content of the task 94 description: | 95 Task content can contain [GFM](https://help.github.com/articles/github-flavored-markdown/). 96 type: string 97 minLength: 5 98 completed: 99 title: when true this task is completed 100 type: boolean 101 creditcard: 102 title: the credit card format usage 103 type: string 104 format: creditcard 105 createdAt: 106 title: task creation time 107 type: string 108 format: date-time 109 readOnly: true