Changeset 2328


Ignore:
Timestamp:
Sep 29, 2017, 5:40:23 PM (3 weeks ago)
Author:
bruno
Message:

First validated API made (thanks to Jan Henning Thorsen for his help !)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-server/api.yml

    r2323 r2328  
    2323  - application/json
    2424  - application/yaml
     25# Global parameters
    2526paths:
    2627  /doc:
     
    6162      parameters:
    6263        - name: name
    63           #in: body
     64          in: body
    6465          description: Add project by name
    6566          required: true
     
    7980          schema:
    8081            $ref: '#/definitions/Error'
    81   '/prj/{prjname}/conf':
     82  /conf:
    8283    get:
    8384      summary: List all configuration parameters for a specific project
     
    8687        - conf
    8788      parameters:
    88         - name: prjname
    89           in: path
    90           required: true
    91           description: The name of the project that will be queried for configuration
    92           type: string
     89        - $ref: '#/parameters/prjName'
    9390      responses:
    9491        '200':
     
    10198          schema:
    10299            $ref: '#/definitions/Error'
    103   '/prj/{prjname}/conf/{confname}':
     100  '/conf/{confname}':
    104101    get:
    105102      operationId: showConf
     103      summary: Get a configuration item
    106104      tags:
    107105        - conf
    108106      parameters:
    109         - name: prjname
    110           in: path
    111           required: true
    112           description: The name of the project for which we retrieve configuration
    113           type: string
    114107        - name: confname
    115108          in: path
     109          type: string
    116110          required: true
    117111          description: The name of the configuration item that will be queried
     112        - $ref: '#/parameters/prjName'
    118113      responses:
    119114        '200':
     
    125120          schema:
    126121            $ref: '#/definitions/Error'
    127     put:
    128       operationId: updateConf
    129       tags:
    130         - conf
    131       parameters:
    132         - name: name
    133           #in: body
    134           description: Add a configuration item by name
    135           required: true
    136           schema:
    137             $ref: '#/definitions/Conf'
    138       responses:
    139         '200':
    140           description: Expected response to a valid request
    141           schema:
    142             $ref: '#/definitions/Conf'
    143         '409':
    144           description: Null response
    145           schema:
    146             $ref: '#/definitions/Error'
    147         default:
    148           description: Unexpected error
    149           schema:
    150             $ref: '#/definitions/Error'
    151     delete:
    152       operationId: removeConf
    153       parameters:
    154         - name: prjname
    155           in: path
    156           required: true
    157           description: The name of the project for which we retrieve configuration
    158           type: string
    159         - name: confname
    160           in: path
    161           required: true
    162           description: The name of the configuration item that will be deleted
    163       responses:
    164         '200':
    165           description: Expected response to a valid request
    166         '404':
    167           description: Configuration item not found
    168         default:
    169           description: Unexpected error
    170           schema:
    171             $ref: '#/definitions/Error'
     122parameters:
     123  prjName:
     124    required: true
     125    name: pbproj
     126    in: body
     127    description: The name of the project that will be queried
     128    schema:
     129      type: string
     130      default: 'pb'
    172131definitions:
    173132  Prj:
Note: See TracChangeset for help on using the changeset viewer.