openapi: 3.0.0
info:
  title: stock
  version: '1.0'
servers:
  - url: 'http://localhost:3000'
paths:
  /stock/item/search:
    post:
      summary: ''
      operationId: post-stock-item-search
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockItemSearchResponse'
              examples:
                example-1:
                  value:
                    stockItems:
                      - id: 0
                        typeId: 0
                        note: string
                        name: string
                        quantity: 0
                        unitMeasureId: 0
                        unitPriceVat: 0
                        tax: 0
                        accountingId: 0
                        classificationDPHId: 0
                        classificationKVDPHId: 0
                        ' numberOfItemsInStock': 0
                        serialNumber: string
                        discountId: 0
                    resultCount: 0
                    currentPage: 0
                    currentPageLenght: 0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StockItemSearchRequest'
            examples:
              example-1:
                value:
                  searchValue: string
                  order:
                    order: string
                  pagination:
                    pageLength: 0
                    pageId: 0
                  filter:
                    value: string
        description: ''
  '/stock/item/get/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Your GET endpoint
      tags: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockItem'
              examples:
                example-1:
                  value:
                    id: 0
                    typeId: 0
                    note: string
                    name: string
                    quantity: 0
                    unitMeasureId: 0
                    unitPriceVat: 0
                    tax: 0
                    accountingId: 0
                    classificationDPHId: 0
                    classificationKVDPHId: 0
                    ' numberOfItemsInStock': 0
                    serialNumber: string
                    discountId: 0
      operationId: get-stock-item-get-id
components:
  schemas:
    StockItemSearchRequest:
      description: ''
      type: object
      x-examples:
        StockItemSearchRequest:
          searchValue: string
          order:
            order: string
          pagination:
            pageLength: 0
            pageId: 0
          filter:
            value: string
      properties:
        searchValue:
          type: string
          minLength: 1
        order:
          $ref: '#/components/schemas/StockItemSearchOrder'
        pagination:
          $ref: '#/components/schemas/StockItemSearchPagination'
        filter:
          $ref: '#/components/schemas/StockItemSearchFilter'
      required:
        - searchValue
    StockItemSearchResponse:
      description: ''
      type: object
      x-examples:
        ' StockItemSearchResponse':
          stockItems:
            - id: 0
              typeId: 0
              note: string
              name: string
              quantity: 0
              unitMeasureId: 0
              unitPriceVat: 0
              tax: 0
              accountingId: 0
              classificationDPHId: 0
              classificationKVDPHId: 0
              ' numberOfItemsInStock': 0
              serialNumber: string
              discountId: 0
          resultCount: 0
          currentPage: 0
          currentPageLenght: 0
      properties:
        stockItems:
          type: array
          items:
            $ref: '#/components/schemas/StockItem'
        resultCount:
          type: number
        currentPage:
          type: number
        currentPageLenght:
          type: number
    StockItemSearchFilter:
      description: ''
      type: object
      x-examples:
        StockItemSearchFilter:
          value: string
      title: ''
      properties:
        value:
          type: string
          minLength: 1
    StockItemSearchPagination:
      description: ''
      type: object
      x-examples:
        StockItemSearchPagination:
          pageLength: 0
          pageId: 0
      properties:
        pageLength:
          type: number
        pageId:
          type: number
    StockItemSearchOrder:
      description: ''
      type: object
      x-examples:
        StockItemSearchOrder:
          order: string
      properties:
        order:
          type: string
          minLength: 1
    StockItem:
      description: ''
      type: object
      x-examples:
        StockItem:
          id: 0
          typeId: 0
          note: string
          name: string
          quantity: 0
          unitMeasureId: 0
          unitPriceVat: 0
          tax: 0
          accountingId: 0
          classificationDPHId: 0
          classificationKVDPHId: 0
          ' numberOfItemsInStock': 0
          serialNumber: string
          discountId: 0
      properties:
        id:
          type: number
        typeId:
          type: number
        note:
          type: string
          minLength: 1
        name:
          type: string
        quantity:
          type: number
        unitMeasureId:
          type: integer
        unitPriceVat:
          type: number
        tax:
          type: number
        accountingId:
          type: integer
        classificationDPHId:
          type: integer
        classificationKVDPHId:
          type: integer
        ' numberOfItemsInStock':
          type: number
        serialNumber:
          type: string
        discountId:
          type: integer
      required:
        - id
        - typeId
        - name
        - quantity
        - unitMeasureId
        - unitPriceVat
        - tax
