|
| 1 | +openapi: 3.0.2 |
| 2 | +info: |
| 3 | + description: This API provides Donation list |
| 4 | + version: 0.2.0 |
| 5 | + title: Donation List API |
| 6 | + contact: |
| 7 | + |
| 8 | + license: |
| 9 | + name: Apache 2.0 |
| 10 | + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' |
| 11 | +tags: |
| 12 | + - name: contributors |
| 13 | + description: Secured write permission calls |
| 14 | + - name: developers |
| 15 | + description: Operations available to regular developers |
| 16 | +paths: |
| 17 | + /donation: |
| 18 | + get: |
| 19 | + tags: |
| 20 | + - developers |
| 21 | + summary: searches donation |
| 22 | + operationId: searchDonation |
| 23 | + description: | |
| 24 | + By passing in the appropriate options, you can search for |
| 25 | + available inventory in the system |
| 26 | + parameters: |
| 27 | + - in: query |
| 28 | + name: searchString |
| 29 | + description: pass an optional search string for looking up inventory |
| 30 | + required: false |
| 31 | + schema: |
| 32 | + type: string |
| 33 | + - in: query |
| 34 | + name: skip |
| 35 | + description: number of records to skip for pagination |
| 36 | + schema: |
| 37 | + type: integer |
| 38 | + format: int32 |
| 39 | + minimum: 0 |
| 40 | + - in: query |
| 41 | + name: limit |
| 42 | + description: maximum number of records to return |
| 43 | + schema: |
| 44 | + type: integer |
| 45 | + format: int32 |
| 46 | + minimum: 0 |
| 47 | + maximum: 50 |
| 48 | + responses: |
| 49 | + '200': |
| 50 | + description: search results matching criteria |
| 51 | + content: |
| 52 | + application/json: |
| 53 | + schema: |
| 54 | + type: array |
| 55 | + items: |
| 56 | + $ref: '#/components/schemas/DonationItem' |
| 57 | + '400': |
| 58 | + description: bad input parameter |
| 59 | + post: |
| 60 | + tags: |
| 61 | + - contributors |
| 62 | + summary: adds a donation item |
| 63 | + operationId: addDonation |
| 64 | + description: Adds an item to the system |
| 65 | + responses: |
| 66 | + '201': |
| 67 | + description: item created |
| 68 | + '400': |
| 69 | + description: 'invalid input, object invalid' |
| 70 | + '409': |
| 71 | + description: an existing item already exists |
| 72 | + requestBody: |
| 73 | + content: |
| 74 | + application/json: |
| 75 | + schema: |
| 76 | + $ref: '#/components/schemas/DonationItem' |
| 77 | + description: Donation item to add |
| 78 | +servers: |
| 79 | + - url: 'https://virtserver.swaggerhub.com/wuhan2020/donation/0.2.0' |
| 80 | +components: |
| 81 | + schemas: |
| 82 | + DonationItem: |
| 83 | + type: object |
| 84 | + required: |
| 85 | + - id |
| 86 | + - source |
| 87 | + - donate_way |
| 88 | + - offical_link |
| 89 | + - contact |
| 90 | + - cur_status |
| 91 | + - source_link |
| 92 | + - audit_status |
| 93 | + - update_time |
| 94 | + properties: |
| 95 | + id: |
| 96 | + type: string |
| 97 | + format: uuid |
| 98 | + example: d290f1ee-6c54-4b01-90e6-d701748f0851 |
| 99 | + source: |
| 100 | + type: string |
| 101 | + example: 红十字会 |
| 102 | + donate_way: |
| 103 | + type: string |
| 104 | + example: 支付宝 |
| 105 | + offical_link: |
| 106 | + type: string |
| 107 | + format: uri |
| 108 | + example: https://mp.weixin.qq.com/s/qGAsMA4hsduP99CaabdQDg |
| 109 | + contact: |
| 110 | + type: array |
| 111 | + items: |
| 112 | + $ref: '#/components/schemas/ContactItem' |
| 113 | + cur_status: |
| 114 | + type: string |
| 115 | + example: 已捐赠; 筹款中; |
| 116 | + source_link: |
| 117 | + type: string |
| 118 | + format: uri |
| 119 | + example: https://mp.weixin.qq.com/s/qGAsMA4hsduP99CaabdQDg |
| 120 | + audit_status: |
| 121 | + type: string |
| 122 | + example: 已审计; 审计中; |
| 123 | + update_time: |
| 124 | + type: string |
| 125 | + format: date-time |
| 126 | + example: '2020-01-23T09:12:33.001Z' |
| 127 | + ContactItem: |
| 128 | + type: object |
| 129 | + required: |
| 130 | + - name |
| 131 | + - phone |
| 132 | + properties: |
| 133 | + name: |
| 134 | + type: string |
| 135 | + example: xxx |
| 136 | + phone: |
| 137 | + type: string |
| 138 | + example: 12315 |
0 commit comments