github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/codegen/shipyard.yml (about) 1 swagger: '2.0' 2 info: 3 version: 0.0.0 4 title: APIs for building docker images. 5 basePath: /beeswax/images/api/v1 6 consumes: 7 - application/json 8 produces: 9 - application/json 10 paths: 11 '/{repository}/applications': 12 get: 13 description: Get all applications for this repository 14 operationId: getAllApplications 15 responses: 16 '200': 17 description: The request was for a repository and applications exist within that repository 18 schema: 19 type: array 20 items: 21 $ref: '#/definitions/Application' 22 '404': 23 description: The request was for a repository that does not exist 24 schema: 25 $ref: '#/definitions/Error' 26 post: 27 description: Create an image of the specified revision 28 operationId: createApplication 29 consumes: 30 - multipart/form-data 31 produces: 32 - application/json 33 responses: 34 '201': 35 description: The request was for a valid repo, application, and image. The image was created 36 schema: 37 $ref: '#/definitions/Image' 38 '409': 39 description: Application and image already exists 40 schema: 41 $ref: '#/definitions/Error' 42 '404': 43 description: The repository and application does not exist 44 schema: 45 $ref: '#/definitions/Error' 46 parameters: 47 - name: application 48 in: formData 49 description: The Application name 50 required: true 51 type: string 52 - name: revision 53 in: formData 54 description: The Revision of the image 55 required: true 56 type: string 57 - name: file 58 in: formData 59 description: The file data as a multipart 60 required: true 61 type: file 62 # format: byte 63 parameters: 64 - $ref: '#/parameters/repository' 65 '/{repository}/apps/{application}/images': 66 get: 67 description: Get all built images for the application in the repository 68 operationId: getImageRevisions 69 responses: 70 '200': 71 description: The request was for a valid repository and application 72 schema: 73 type: array 74 items: 75 $ref: '#/definitions/Image' 76 '404': 77 description: The request was for a repository or application that does not exist 78 schema: 79 $ref: '#/definitions/Error' 80 parameters: 81 - $ref: '#/parameters/repository' 82 - $ref: '#/parameters/application' 83 '/{repository}/apps/{application}/images/{revision}': 84 get: 85 description: Get the image for the specfied revision of the application within the repo 86 operationId: getImage 87 responses: 88 '200': 89 description: The request was for a valid repository and application and revision 90 schema: 91 $ref: '#/definitions/Image' 92 '404': 93 description: The request was for a repository or application that does not exist 94 schema: 95 $ref: '#/definitions/Error' 96 parameters: 97 - $ref: '#/parameters/repository' 98 - $ref: '#/parameters/application' 99 - $ref: '#/parameters/revision' 100 definitions: 101 Image: 102 description: An image of an application and revision 103 allOf: 104 - $ref: '#/definitions/Links' 105 - type: object 106 properties: 107 created: 108 description: The timestamp the image was created 109 type: string 110 format: date-time 111 size: 112 description: 'The size of the image, in bytes' 113 type: integer 114 imageId: 115 description: The docker image id SHA 116 type: string 117 required: 118 - created 119 - size 120 - imageId 121 Application: 122 description: An application 123 allOf: 124 - $ref: '#/definitions/Links' 125 - type: object 126 properties: 127 name: 128 description: The name of the application 129 type: string 130 required: 131 - name 132 Error: 133 description: Object used for all API errors. 134 type: object 135 properties: 136 message: 137 type: string 138 logs: 139 type: array 140 items: 141 type: string 142 required: 143 - message 144 Links: 145 description: Object used to wrap resource links. 146 type: object 147 properties: 148 _links: 149 description: Container for any number of named resource links. 150 type: object 151 additionalProperties: 152 description: A resource link. 153 type: object 154 properties: 155 href: 156 description: The link to the resource. 157 format: uri 158 type: string 159 required: 160 - href 161 required: 162 - _links 163 parameters: 164 repository: 165 name: repository 166 in: path 167 description: The Docker repository name 168 required: true 169 type: string 170 application: 171 name: application 172 in: path 173 description: The Application name 174 required: true 175 type: string 176 revision: 177 name: revision 178 in: path 179 description: The revision of the application 180 required: true 181 type: string 182 tags: 183 - name: deploy 184 description: Deploy operation