Ignore:
Timestamp:
Feb 16, 2020, 5:51:58 PM (7 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, master
Children:
6da03be
Parents:
9af0638
Message:

Logs upload is now working

Signed-off-by: Joachim Langenbach <joachim.langenbach@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mapservice/openapi.yaml

    r9af0638 rec9e811  
    501501        '404':
    502502          $ref: '#/components/responses/NotFound'
    503   '/logs':
     503  /logs:
     504    get:
     505      description: Returns all log metadata
     506      tags:
     507        - logs
     508      summary: Find logs by id
     509      operationId: logsGet
     510      parameters:
     511        - name: submitter
     512          in: query
     513          schema:
     514            $ref: '#/components/schemas/username'
     515          example: jane
     516        - $ref: '#/components/parameters/orderBy'
     517        - $ref: '#/components/parameters/offset'
     518        - $ref: '#/components/parameters/limit'
     519      responses:
     520        '200':
     521          description: OK
     522          content:
     523            application/json:
     524              schema:
     525                $ref: '#/components/schemas/logs'
     526              examples:
     527                Logs:
     528                  $ref: '#/components/examples/logs'
     529        '404':
     530          $ref: '#/components/responses/NotFound'
    504531    post:
    505       description: Adds a new log to the database
     532      description: Creates a new log from given meta data. The log entries itself, must be uploaded per /logs/{log_id}
    506533      tags:
    507534        - logs
    … …  
    513540      requestBody:
    514541        content:
    515           multipart/form-data:
     542          application/json:
    516543            schema:
    517               type: object
    518               properties:
    519                 metaData:
    520                   $ref: '#/components/schemas/LogCreation'
    521                 file:
    522                   type: string
    523                   format: binary
     544              $ref: '#/components/schemas/LogCreation'
    524545      responses:
    525546        '201':
    … …  
    570591        '404':
    571592          $ref: '#/components/responses/NotFound'
     593    post:
     594      description: Adds log entries from uploaded file to current Log
     595      tags:
     596        - logs
     597      summary: Add a new log entries
     598      operationId: logsLogUpload
     599      parameters:
     600        - name: log_id
     601          in: path
     602          description: Log ID
     603          required: true
     604          schema:
     605            $ref: '#/components/schemas/itemId'
     606      security:
     607        - basicAuth: []
     608        - apiKeyAuth: []
     609      requestBody:
     610        content:
     611          text/plain:
     612            schema:
     613              type: string
     614              format: binary
     615      responses:
     616        '201':
     617          description: Logs uploaded
     618          content:
     619            application/geo+json:
     620              schema:
     621                $ref: '#/components/schemas/LogGeoJson'
     622              examples:
     623                Log:
     624                  $ref: '#/components/examples/LogGeoJson'
     625            application/json:
     626              schema:
     627                $ref: '#/components/schemas/Log'
     628              examples:
     629                Log:
     630                  $ref: '#/components/examples/Log'
     631        '400':
     632          $ref: '#/components/responses/BadRequest'
     633        '401':
     634          $ref: '#/components/responses/Unauthorized'
    572635    delete:
    573636      description: Deletes given log and returns remaining logs of the gauge
    … …  
    635698      title: Item Name
    636699      type: string
     700    itemBase:
     701      title: 'Basic, generic item data'
     702      type: object
     703      properties:
     704        label:
     705          type: string
     706          description: >-
     707            A representative name, for the item, which could be understand by
     708            the user. Mostly it should be the itemName
     709        id:
     710          $ref: '#/components/schemas/itemId'
     711        url:
     712          type: string
     713          format: url
     714          description: 'Url, where details of the object could be retrieved'
     715      required:
     716        - label
     717        - id
    637718    order:
    638719      title: order
    … …  
    799880        location:
    800881          $ref: '#/components/schemas/point'
     882        water:
     883          $ref: '#/components/schemas/itemBase'
    801884        comment:
    802885          $ref: '#/components/schemas/comment'
    … …  
    902985          $ref: '#/components/schemas/username'
    903986        water:
    904           $ref: '#/components/schemas/itemId'
     987          $ref: '#/components/schemas/itemBase'
    905988        device:
    906           $ref: '#/components/schemas/itemId'
     989          $ref: '#/components/schemas/itemBase'
    907990        gauge:
    908           $ref: '#/components/schemas/itemId'
     991          $ref: '#/components/schemas/itemBase'
    909992        gaugeLevel:
    910993          $ref: '#/components/schemas/GaugeLevel'
    … …  
    10201103  parameters:
    10211104    orderBy:
    1022       name: orderBy
     1105      name: order_by
    10231106      in: query
    10241107      description: 'Order by field: name'
    … …  
    11941277          end: 2017-07-21T17:32:28.000Z
    11951278          entriesCount: 1
    1196           entries:
    1197             - datetime: null
    1198               location:
    1199                 - 90.136111
    1200                 - 29.934722
    1201               waterDepth: 10
     1279        entries:
     1280          - datetime: null
     1281            location:
     1282              - 90.136111
     1283              - 29.934722
     1284            waterDepth: 10
    12021285    LogGeoJson:
    12031286      value:
    … …  
    12821365    description: All actions used to manage devices of an user
    12831366  - name: logs
    1284     description: All actions used to manage logs of an water, device, gauge or user
     1367    description: 'All actions used to manage logs of an water, device, gauge or user'
Note: See TracChangeset for help on using the changeset viewer.