openapi: 3.0.0
info:
  version: NFDB
  title: 
  description: RESTAPI Genetiq - NFDB
servers:
  - url: http://localhost:8097/
paths:
  /Products:
    get:
      description: ''
      operationId: 'getProducts'
      parameters:
        - in: query
          name: createdon
          description: The date the item was created
          required: false
          schema:
            type: string
            format: date
        - in: query
          name: updatedon
          description: The date the item was last updated
          required: false
          schema:
            type: string
            format: date
      responses:
        200:
          description: A paged collection of items including a total count of matches
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/ProductsCollection'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
        400:
          description: An incorrect query parameter or condition
  /Products/{id}:
    get:
      description: ''
      operationId: 'getProductsById'
      parameters:
        - in: path
          name: id
          description: 'The ID of the item'
          required: true
          schema:
            type: integer
      responses:
        200:
          description: A single 
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/Products'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
        400:
          description: An incorrect query parameter or condition
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
  schemas:
    PostResponse:
      type: object
      properties:
        Status:
          type: string
        Message:
          type: string
        QueueEntryId:
          type: integer
        Data:
          type: array
          items:
            type: object
            properties:
              Id:
                type: integer
              TypeName:
                type: string
              Info:
                type: string
    PutResponse:
      type: object
      properties:
        Status:
          type: string
        Message:
          type: string
        QueueEntryId:
          type: integer
        Data:
          type: array
          items:
            type: object
            properties:
              Id:
                type: integer
              TypeName:
                type: string
              Info:
                type: string
    Products:
      type: object
      properties:
        ID:
          type: integer
          format: int64
        UpdatedOn:
          type: string
          format: date
        CreatedOn:
          type: string
          format: date
        Code:
          type: string
        D_NFDBID:
          type: string
        Description:
          type: string
    Products_Write:
      type: object
      properties:
        ID:
          type: integer
          format: int64
        UpdatedOn:
          type: string
          format: date
        CreatedOn:
          type: string
          format: date
        Code:
          type: string
        D_NFDBID:
          type: string
        Description:
          type: string
    ProductsCollection:
      type: object
      properties:
        TotalCount:
          type: integer
        Data:
          type: array
          items:
            $ref: '#/components/schemas/Products'
security:
  - apiKey: []
