openapi: 3.0.0
info:
  title: User API - ValueStreamer
  version: 1.0.0
  description: "This is the specification of the REST interface for the user entity."
servers:
  - url: https://api-tenant.valuestreamer.de/api
security:
  - basicAuth: []
  
paths:
  /exchange/users:
    get:
      tags:
        - "User"
      summary: "Get all users"
      responses:
        '200':
          description: OK
          content:
            application/vs.us.v1.0.0+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '500':
          $ref: '#/components/responses/InternalServerError'  
components:
  securitySchemes:
    basicAuth:           
      type: http
      scheme: basic
  schemas:
    # Schema for error response body
    Error:
      type: object
      properties:
        errorId:
          type: number
        errorMessage:
          type: string
    User:
      type: "object"
      properties:
        id:
          type: string
          format: uuid
        firstName:
          type: string
          maxLength: 55
        lastName:
          type: string
          maxLength: 55
        email:
          type: string
          maxLength: 255
  responses:
    NotFound:
      description: Resource not found
      content:
        application/vs.us.v1.0.0+json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Not authorized
      content:
        application/vs.us.v1.0.0+json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request
      content:
        application/vs.us.v1.0.0+json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/vs.us.v1.0.0+json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedMediaType:
      description: UnsupportedMediaType
      content:
        application/vs.us.v1.0.0+json:
          schema:
            $ref: '#/components/schemas/Error'
