[2323] | 1 | ---
|
---|
| 2 | swagger: '2.0'
|
---|
| 3 | info:
|
---|
| 4 | title: Project-Builder.org
|
---|
| 5 | description: PBSUMMARY
|
---|
| 6 | license:
|
---|
| 7 | name: General Public License 3.0
|
---|
| 8 | url: http://www.gnu.org/
|
---|
| 9 | #termsOfService: 'http://www.example.com/terms'
|
---|
| 10 | contact:
|
---|
| 11 | name: API Support
|
---|
| 12 | url: 'http://www.project-builder.org/support'
|
---|
| 13 | #email: support@example.com
|
---|
| 14 | version: 'PBAPIVER'
|
---|
| 15 | host: localhost
|
---|
| 16 | basePath: /api/vPBAPIVER
|
---|
| 17 | schemes:
|
---|
| 18 | - http
|
---|
| 19 | consumes:
|
---|
| 20 | - application/json
|
---|
| 21 | - application/yaml
|
---|
| 22 | produces:
|
---|
| 23 | - application/json
|
---|
| 24 | - application/yaml
|
---|
[2328] | 25 | # Global parameters
|
---|
[2323] | 26 | paths:
|
---|
[2623] | 27 | /hello:
|
---|
| 28 | operationId: helloWorld
|
---|
| 29 | x-mojo-name: hello_world
|
---|
| 30 | x-mojo-to: example#hello_world
|
---|
| 31 | summary: Test entry point
|
---|
| 32 | responses:
|
---|
| 33 | '200':
|
---|
| 34 | description: Return hello
|
---|
| 35 | schema:
|
---|
| 36 | type: object
|
---|
| 37 | properties:
|
---|
| 38 | greetings:
|
---|
| 39 | type: string
|
---|
| 40 | default:
|
---|
| 41 | description: Unexpected error
|
---|
| 42 | schema:
|
---|
| 43 | $ref: '#/definitions/Error'
|
---|
[2323] | 44 | /doc:
|
---|
| 45 | get:
|
---|
| 46 | summary: API Documentation
|
---|
| 47 | operationId: docPb
|
---|
| 48 | tags:
|
---|
| 49 | - pb
|
---|
| 50 | responses:
|
---|
| 51 | '200':
|
---|
| 52 | description: Expected response to a valid request
|
---|
| 53 | schema:
|
---|
| 54 | $ref: '#/definitions/Conf'
|
---|
| 55 | default:
|
---|
| 56 | description: Unexpected error
|
---|
| 57 | schema:
|
---|
| 58 | $ref: '#/definitions/Error'
|
---|
| 59 | /prj:
|
---|
| 60 | get:
|
---|
| 61 | summary: List all projects
|
---|
[2329] | 62 | operationId: listPrjs
|
---|
[2323] | 63 | tags:
|
---|
| 64 | - prj
|
---|
| 65 | responses:
|
---|
| 66 | '200':
|
---|
| 67 | description: List of all projects managed by project-builder.org
|
---|
| 68 | schema:
|
---|
| 69 | $ref: '#/definitions/Prj'
|
---|
| 70 | default:
|
---|
| 71 | description: Unexpected error
|
---|
| 72 | schema:
|
---|
| 73 | $ref: '#/definitions/Error'
|
---|
| 74 | put:
|
---|
| 75 | summary: Create a new project
|
---|
| 76 | operationId: newPrj
|
---|
| 77 | tags:
|
---|
| 78 | - prj
|
---|
| 79 | parameters:
|
---|
| 80 | - name: name
|
---|
[2328] | 81 | in: body
|
---|
[2323] | 82 | description: Add project by name
|
---|
| 83 | required: true
|
---|
| 84 | schema:
|
---|
| 85 | $ref: '#/definitions/Prj'
|
---|
| 86 | responses:
|
---|
| 87 | '200':
|
---|
| 88 | description: Expected response to a valid request
|
---|
| 89 | schema:
|
---|
| 90 | $ref: '#/definitions/Prj'
|
---|
| 91 | '409':
|
---|
| 92 | description: Null response
|
---|
| 93 | schema:
|
---|
| 94 | $ref: '#/definitions/Error'
|
---|
| 95 | default:
|
---|
| 96 | description: Unexpected error
|
---|
| 97 | schema:
|
---|
| 98 | $ref: '#/definitions/Error'
|
---|
[2329] | 99 | '/conf/{prj}':
|
---|
[2323] | 100 | get:
|
---|
| 101 | summary: List all configuration parameters for a specific project
|
---|
| 102 | operationId: listConf
|
---|
| 103 | tags:
|
---|
| 104 | - conf
|
---|
| 105 | parameters:
|
---|
[2329] | 106 | - $ref: '#/parameters/prj'
|
---|
[2323] | 107 | responses:
|
---|
| 108 | '200':
|
---|
| 109 | description: Expected response to a valid request
|
---|
| 110 | schema:
|
---|
| 111 | items:
|
---|
| 112 | $ref: '#/definitions/Conf'
|
---|
| 113 | default:
|
---|
| 114 | description: Unexpected error
|
---|
| 115 | schema:
|
---|
| 116 | $ref: '#/definitions/Error'
|
---|
[2329] | 117 | '/conf/{prj}/{confname}':
|
---|
[2323] | 118 | get:
|
---|
| 119 | operationId: showConf
|
---|
[2328] | 120 | summary: Get a configuration item
|
---|
[2323] | 121 | tags:
|
---|
| 122 | - conf
|
---|
| 123 | parameters:
|
---|
[2329] | 124 | - $ref: '#/parameters/prj'
|
---|
[2328] | 125 | - name: confname
|
---|
[2323] | 126 | in: path
|
---|
| 127 | type: string
|
---|
| 128 | required: true
|
---|
| 129 | description: The name of the configuration item that will be queried
|
---|
| 130 | responses:
|
---|
| 131 | '200':
|
---|
| 132 | description: Expected response to a valid request
|
---|
| 133 | schema:
|
---|
| 134 | $ref: '#/definitions/Conf'
|
---|
| 135 | default:
|
---|
| 136 | description: Unexpected error
|
---|
| 137 | schema:
|
---|
| 138 | $ref: '#/definitions/Error'
|
---|
[2328] | 139 | parameters:
|
---|
[2329] | 140 | prj:
|
---|
[2331] | 141 | name: prj
|
---|
| 142 | description: The name of the project that will be queried
|
---|
[2328] | 143 | required: true
|
---|
[2329] | 144 | in: path
|
---|
| 145 | type: string
|
---|
[2323] | 146 | definitions:
|
---|
| 147 | Prj:
|
---|
| 148 | required:
|
---|
| 149 | - name
|
---|
| 150 | properties:
|
---|
| 151 | name:
|
---|
| 152 | type: string
|
---|
| 153 | tag:
|
---|
| 154 | type: string
|
---|
| 155 | Conf:
|
---|
| 156 | required:
|
---|
| 157 | - name
|
---|
| 158 | properties:
|
---|
| 159 | name:
|
---|
| 160 | type: string
|
---|
| 161 | tag:
|
---|
| 162 | type: string
|
---|
| 163 | Error:
|
---|
| 164 | required:
|
---|
| 165 | - code
|
---|
| 166 | - message
|
---|
| 167 | properties:
|
---|
| 168 | code:
|
---|
| 169 | type: integer
|
---|
| 170 | format: int32
|
---|
| 171 | message:
|
---|
| 172 | type: string
|
---|