Ignore:
Timestamp:
Apr 22, 2019, 5:39:46 PM (8 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, master
Children:
041e464
Parents:
5e4cb73
Message:

Improved adding Water UI in mapservice-webclient

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mapservice/openapi.yaml

    r5e4cb73 rbe25db1  
    2323        default: v1
    2424paths:
     25  '/user':
     26    get:
     27      description: Returns information for a user
     28      tags:
     29        - users
     30      summary: Returns info of a user
     31      operationId: usersGet
     32      security:
     33        - basicAuth: []
     34        - apiKeyAuth: []
     35      responses:
     36        '200':
     37          description: OK
     38          content:
     39            application/json:
     40              schema:
     41                $ref: '#/components/schemas/User'
     42              examples:
     43                User:
     44                  $ref: '#/components/examples/User'
     45        '400':
     46          $ref: '#/components/responses/BadRequest'
     47        '401':
     48          $ref: '#/components/responses/Unauthorized'
     49    post:
     50      description: Registers a new user
     51      tags:
     52        - users
     53      summary: Registers a new user
     54      operationId: usersRegister
     55      requestBody:
     56        content:
     57          application/json:
     58            schema:
     59              $ref: '#/components/schemas/UserCreation'
     60            examples:
     61              Water:
     62                $ref: '#/components/examples/UserCreation'
     63      responses:
     64        '201':
     65          description: Userr created
     66          content:
     67            application/json:
     68              schema:
     69                $ref: '#/components/schemas/User'
     70              examples:
     71                Water:
     72                  $ref: '#/components/examples/User'
     73        '400':
     74          $ref: '#/components/responses/BadRequest'
     75    options:
     76      description: Used by CORS preflight
     77      tags:
     78        - users
     79      responses:
     80        '200':
     81          description: CORS prefilght requests should return 200 as status code
     82          content:
     83           application/json: {}
     84  '/user/apikey_create':
     85    get:
     86      description: Generates and returns a new API key for current user
     87      tags:
     88        - users
     89      summary: Returns a new API key
     90      operationId: usersApiKeyCreate
     91      security:
     92        - basicAuth: []
     93        - apiKeyAuth: []
     94      responses:
     95        '200':
     96          description: OK
     97          content:
     98            application/json:
     99              schema:
     100                $ref: '#/components/schemas/apiKeys'
     101              example: 'NewApiKey4711'
     102        '400':
     103          $ref: '#/components/responses/BadRequest'
     104        '401':
     105          $ref: '#/components/responses/Unauthorized'
     106  '/user/{api_key}':
     107    delete:
     108      description: Deletes given API key and returns remaining API keys of the user
     109      tags:
     110        - users
     111      summary: Deletes API key
     112      operationId: usersApiKeyDelete
     113      security:
     114        - basicAuth: []
     115        - apiKeyAuth: []
     116      parameters:
     117        - name: api_key
     118          in: path
     119          description: API key
     120          required: true
     121          schema:
     122            $ref: '#/components/schemas/apiKey'
     123          example: 'DelApiKey4711'
     124      responses:
     125        '200':
     126          description: OK
     127          content:
     128            application/json:
     129              schema:
     130                $ref: '#/components/schemas/apiKeys'
     131              example: 'ApiKey4711'
     132        '400':
     133          $ref: '#/components/responses/BadRequest'
     134        '401':
     135          $ref: '#/components/responses/Unauthorized'
     136  '/user/activate/{activation_code}':
     137    get:
     138      description: Activates a user account
     139      tags:
     140        - users
     141      summary: Activates a user account
     142      operationId: usersActivate
     143      parameters:
     144        - name: activation_code
     145          in: path
     146          description: Activation code
     147          required: true
     148          schema:
     149            $ref: '#/components/schemas/activationCode'
     150          example: 'dac9630aec642a428cd73f4be0a03569'
     151      responses:
     152        '302':
     153          description: OK or not OK
     154          headers:
     155            Location:
     156              schema:
     157                type: string
     158              description: URL to the website, showing the result of the activation
    25159  /waters:
    26160    get:
    … …  
    32166      parameters:
    33167        - name: name
    34           in: header
     168          in: query
    35169          schema:
    36170            $ref: '#/components/schemas/item_name'
     171          example: 'Missi'
    37172        - name: manager
    38           in: header
     173          in: query
    39174          schema:
    40175            $ref: '#/components/schemas/username'
     176          example: 'jane'
    41177        - $ref: '#/components/parameters/orderBy'
    42178        - $ref: '#/components/parameters/offset'
    … …  
    57193        - waters
    58194      summary: Add a new water
     195      operationId: watersCreate
    59196      security:
    60197        - basicAuth: []
    61198        - apiKeyAuth: []
    62199      requestBody:
    63         description: item id of water is going to be ignored
    64200        content:
    65201          application/json:
    … …  
    124260      title: Username
    125261      type: string
     262    apiKey:
     263      title: API Key
     264      type: string
     265    apiKeys:
     266      title: Array of API keys
     267      type: array
     268      items:
     269        $ref: '#/components/schemas/apiKey'
     270    activationCode:
     271      title: Activation code for a User
     272      type: string
    126273    item_id:
    127274      title: Item ID
    … …  
    131278      title: Item Name
    132279      type: string
    133     osm_type:
     280    osmType:
    134281      maxLength: 1
    135282      minLength: 1
    136283      type: string
     284    User:
     285      title: User
     286      type: object
     287      properties:
     288        username:
     289          $ref: '#/components/schemas/username'
     290        email:
     291          type: string
     292        firstName:
     293          type: string
     294        lastName:
     295          type: string
     296        activated:
     297          type: boolean
     298        apiKeys:
     299          $ref: '#/components/schemas/apiKeys'
     300    UserCreation:
     301      title: User
     302      type: object
     303      properties:
     304        username:
     305          $ref: '#/components/schemas/username'
     306        email:
     307          type: string
     308        firstName:
     309          type: string
     310        lastName:
     311          type: string
     312        password:
     313          type: string
     314      required:
     315        - username
     316        - email
     317        - firstName
     318        - lastName
     319        - password
    137320    Water:
    138321      title: Water
    139322      type: object
    140323      properties:
    141         water_id:
     324        waterId:
    142325          $ref: '#/components/schemas/item_id'
    143326        name:
    … …  
    145328        manager:
    146329          $ref: '#/components/schemas/username'
    147         osm_id:
     330        osmId:
    148331          $ref: '#/components/schemas/item_id'
    149         osm_type:
    150           $ref: '#/components/schemas/osm_type'
     332        osmType:
     333          $ref: '#/components/schemas/osmType'
    151334        osm_class:
    152           $ref: '#/components/schemas/osm_type'
     335          $ref: '#/components/schemas/osmType'
    153336      required:
    154         - water_id
     337        - waterId
    155338        - name
    156339    WaterCreation:
    … …  
    160343        name:
    161344          $ref: '#/components/schemas/item_name'
    162         osm_id:
     345        osmId:
    163346          $ref: '#/components/schemas/item_id'
    164         osm_type:
    165           $ref: '#/components/schemas/osm_type'
     347        osmType:
     348          $ref: '#/components/schemas/osmType'
    166349      required:
    167350        - name
    … …  
    202385        type: string
    203386        default: name
     387        example: 'name'
    204388    order:
    205389      name: order
    … …  
    208392      schema:
    209393        $ref: '#/components/schemas/order'
     394      example: ''
    210395    offset:
    211396      name: offset
    … …  
    231416        example: 10
    232417  examples:
     418    User:
     419      value:
     420        username: jane
     421        email: jane@example.org
     422        firstName: Jane
     423        lastName: Doe
     424        activated: true
     425        apiKeys:
     426          - ApiKey4701
     427    UserCreation:
     428      value:
     429        username: richard
     430        email: richard@examle.org
     431        firstName: Richard
     432        lastName: Roe
     433        password: sdfl.1238_ASDkeil?
    233434    Water:
    234435      value:
    235         water_id: 1
     436        waterId: 1
    236437        name: Mississippi
    237         osm_id: 1756854
    238         osm_type: R
     438        osmId: 1756854
     439        osmType: R
    239440        link: 'http://gnuboat.engsas.com/mapservice/v1/waters/1'
    240441      summary: A water example object
    … …  
    242443      value:
    243444        name: Mississippi
    244         osm_id: 1756854
    245         osm_type: R
     445        osmId: 1756854
     446        osmType: R
    246447      summary: A water example object for creation of a water
    247448    waters:
    248449      value:
    249         - water_id: 1
     450        - waterId: 1
    250451          name: Mississippi
    251           osm_id: 1756854
    252           osm_type: R
     452          osmId: 1756854
     453          osmType: R
    253454          link: 'http://gnuboat.engsas.com/mapservice/v1/waters/1'
    254         - water_id: 2
     455        - waterId: 2
    255456          name: Bodensee
    256457          link: 'http://gnuboat.engsas.com/mapservice/v1/waters/2'
    … …  
    293494      A water is a river (like Mississippi, lake (Lake Ontario), or a sea (North
    294495      Sea)
     496  - name: users
     497    description: >-
     498      All actions used to manage users and api keys
Note: See TracChangeset for help on using the changeset viewer.