openapi: 3.0.0 # need this as first line to allow some IDEs to know this is an openapi document.
info:
  title: Foo Service Manager
  version: 1.1.1
  license:
    name: 'Apache 3.0'
servers:
  - url: https://api.openshift.com
  - url: https://api.stage.openshift.com
    description: Staging server
  - url: http://localhost:8000
    description: localhost
  - url: /
    description: current domain
paths:
  /api/foo_mgmt/v1/health:
    get:
      operationId: getFooHealth
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
               $ref: '#/components/schemas/Error' 
  /api/foo_mgmt/v1beta/foos/{id}:
    get:
      operationId: getFooById
      tags:
        - "dhjfj"
      responses:
        "200":
          description: "Ok"
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ObjectReference"
                    properties:
                      bar:
                        type: string
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      security:
        - Bearer: []
components:
  schemas:
    ObjectReference:
      type: object
      properties:
        id:
          type: string
        kind:
          type: string
        href:
          type: string
    Error:
      allOf:
        - $ref: "#/components/schemas/ObjectReference"
        - properties:
            code:
              type: string
            operation_id:
              type: string
            reason:
              type: string

    List:
      required:
        - kind
        - page
        - size
        - total
      type: object
      properties:
        kind:
          type: string
        page:
          type: integer
        size:
          type: integer
        total:
          type: integer

  securitySchemes:
    Bearer:
      scheme: 'bearer'
      bearerFormat: 'JWT'
      type: 'http'