| 98 | } |
| 99 | |
| 100 | @ApiUseTag('pet') |
| 101 | @ApiDefineSchema('Category', { |
| 102 | properties: { |
| 103 | id: { |
| 104 | format: 'int64', |
| 105 | type: 'integer', |
| 106 | }, |
| 107 | name: { type: 'string' } |
| 108 | }, |
| 109 | type: 'object', |
| 110 | xml: { name: 'Category' } |
| 111 | }) |
| 112 | @ApiDefineSchema('Tag', { |
| 113 | properties: { |
| 114 | id: { |
| 115 | format: 'int64', |
| 116 | type: 'integer', |
| 117 | }, |
| 118 | name: { type: 'string' } |
| 119 | }, |
| 120 | type: 'object', |
| 121 | xml: { name: 'Tag' } |
| 122 | }) |
| 123 | @ApiDefineSchema('Pet', { |
| 124 | properties: { |
| 125 | category: { $ref: '#/components/schemas/Category' }, |
| 126 | id: { |
| 127 | format: 'int64', |
| 128 | type: 'integer', |
| 129 | }, |
| 130 | name: { |
| 131 | example: 'doggie', |
| 132 | type: 'string' |
| 133 | }, |
| 134 | photoUrls: { |
| 135 | items: { type: 'string' }, |
| 136 | type: 'array', |
| 137 | xml: { |
| 138 | name: 'photoUrl', |
| 139 | wrapped: true |
| 140 | } |
| 141 | }, |
| 142 | status: { |
| 143 | description: 'pet status in the store', |
| 144 | enum: [ 'available', 'pending', 'sold' ], |
| 145 | type: 'string', |
| 146 | }, |
| 147 | tags: { |
| 148 | items: { $ref: '#/components/schemas/Tag' }, |
| 149 | type: 'array', |
| 150 | xml: { |
| 151 | name: 'tag', |
| 152 | wrapped: true |
| 153 | } |
| 154 | } |
| 155 | }, |
| 156 | required: [ 'name', 'photoUrls' ], |
| 157 | type: 'object', |
nothing calls this directly
no test coverage detected