openapi: 3.0.1
info:
  title: OpenAPI definition
  version: v0
servers:
- url: http://localhost:8089
  description: Generated server url
paths:
  /job/{job_id}:
    get:
      tags:
      - jobs
      summary: Vrne status
      operationId: get_job_status
      parameters:
      - name: job_id
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobResponse'
      x-openapi-router-controller: swagger_server.controllers.jobs_controller
    delete:
      tags:
      - jobs
      summary: Izbriše job
      operationId: delete_job
      parameters:
      - name: job_id
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.jobs_controller
  /oznaciBesediloAsync:
    post:
      tags:
      - marktext-async
      summary: Označi surovo (angl. raw) besedilo s classlo/stanzo z uporabo slovenskih
        modelov ter vrne conll-u format
      operationId: get_text
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/oznaciBesediloAsync_body'
        required: true
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_async_controller
  /datotekaVBesediloAsync:
    post:
      tags:
      - marktext-async
      summary: "Pretvori datoteko v besedilo, vrača tekst"
      operationId: get_text_from_doc_async
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/datotekaVBesediloAsync_body'
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_async_controller
  /datotekaVConlluAsync:
    post:
      tags:
      - marktext-async
      summary: Pretvori datoteko v besedilo in označi s classlo/stanzo z uporabo slovenskih
        modelov ter vrne conll-u format
      operationId: get_conllu_from_file_async
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/datotekaVConlluAsync_body'
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_async_controller
  /datotekaVConlluAsync/ocr:
    post:
      tags:
      - marktext-async
      summary: Pretvori datoteko v besedilo in označi s classlo/stanzo z uporabo slovenskih
        modelov ter vrne conll-u format
      operationId: get_conllu_from_file_ocr_async
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/datotekaVConlluAsync_ocr_body'
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_async_controller
  /datotekaVBesediloAsync/ocr:
    post:
      tags:
      - marktext-async
      summary: "Pretvori datoteko v besedilo s pomočjo ocr razpoznavanja, vrača tekst"
      operationId: get_text_from_file_ocr_async
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/datotekaVBesediloAsync_ocr_body'
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_async_controller
  /izlusciSync:
    post:
      tags:
      - extract
      summary: "Izlusci terminološke kandidate iz seznama besedil v conllu obliki\
        \ [sihrono, rezultat v sami zahtevi]"
      operationId: get_candidates_sync
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/izlusciSync_body'
        required: true
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TerminoloskiKandidat'
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.extract_controller
  /izlusciAsync:
    post:
      tags:
      - extract
      summary: "Izlusci terminološke kandidate iz seznama besedil v conllu obliki\
        \ [asinhrono, ustvari novi job]"
      operationId: get_candidates_async
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/izlusciAsync_body'
        required: true
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.extract_controller
  /datotekaVBesediloSync:
    post:
      tags:
      - marktext-sync
      summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... vrača besedilo"
      operationId: datoteka_v_besedilo_sync_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/datotekaVBesediloSync_body'
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_sync_controller
  /datotekaVBesediloSync/ocr:
    post:
      tags:
      - marktext-sync
      summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... v besedilo\
        \ s pomočjo ocr razpoznavanja"
      operationId: get_text_ocr
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/datotekaVBesediloSync_ocr_body'
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_sync_controller
  /datotekaVConlluSync:
    post:
      tags:
      - marktext-sync
      summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... vrača conllu"
      operationId: datoteka_v_besedilo_in_classla
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/datotekaVConlluSync_body'
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_sync_controller
  /datotekaVConlluSync/ocr:
    post:
      tags:
      - marktext-sync
      summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... v conllu s\
        \ pomočjo ocr razpoznavanja"
      operationId: get_conllu_ocr
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/datotekaVConlluSync_ocr_body'
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.marktext_sync_controller
  /oss/steviloBesedilPoIskanju:
    get:
      tags:
      - oss
      summary: Vrne število besedil glede na iskalne pogoje
      operationId: get_number_texts
      parameters:
      - name: leta
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: vrste
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: kljucnebesede
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: udk
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: integer
                format: int64
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.oss_controller
  /oss/izlusciPoIskanju:
    get:
      tags:
      - oss
      summary: Vrne terminloške kandidate glede na ... (sync)
      operationId: get_extracted_words
      parameters:
      - name: leta
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: vrste
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: kljucnebesede
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: udk
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TerminoloskiKandidat'
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.oss_controller
  /oss/izlusciPoIskanjuAsync:
    get:
      tags:
      - oss
      summary: Vrne terminloške kandidate glede na ... (async)
      operationId: get_extracted_words_async
      parameters:
      - name: leta
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: vrste
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: kljucnebesede
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: udk
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.oss_controller
  /oss/datotekePoIskanju:
    get:
      tags:
      - oss
      summary: Vrne seznam binarnih zapisov v originalnem formatu glede na iskalne
        pogoje
      operationId: get_files
      parameters:
      - name: leta
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: vrste
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: kljucnebesede
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: cerifpodrocja
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      responses:
        "200":
          description: OK
          content:
            application/octet-stream:
              schema:
                type: array
                items:
                  type: array
                  items:
                    type: string
                    format: byte
                x-content-type: application/octet-stream
      x-openapi-router-controller: swagger_server.controllers.oss_controller
  /oss/datotekaPoId:
    get:
      tags:
      - oss
      summary: Vrne binarni zapis v originalnem formatu po id-ju datoteke
      operationId: get_file
      parameters:
      - name: file_id
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: integer
          format: int64
      responses:
        "200":
          description: OK
          content:
            application/octet-stream:
              schema:
                type: array
                items:
                  type: string
                  format: byte
                x-content-type: application/octet-stream
      x-openapi-router-controller: swagger_server.controllers.oss_controller
  /oss/conlluPoIskanju:
    get:
      tags:
      - oss
      summary: Vrne seznam CoNNL-U-jev glede na iskalne pogoje
      operationId: get_conllus
      parameters:
      - name: leta
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: vrste
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: kljucnebesede
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: udk
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.oss_controller
  /oss/conlluPoId:
    get:
      tags:
      - oss
      summary: Vrne CoNNL-U po id-ju datoteke
      operationId: get_conllu
      parameters:
      - name: file_id
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: integer
          format: int64
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.oss_controller
  /oss/besediloPoId:
    get:
      tags:
      - oss
      summary: Vrne besedilo po id-ju datoteke
      operationId: oss_besedilo_po_id_get
      parameters:
      - name: file_id
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: integer
          format: int64
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.oss_controller
  /oss/besedilaPoIskanju:
    get:
      tags:
      - oss
      summary: Vrne seznam besedil glede na iskalne pogoje
      operationId: get_texts
      parameters:
      - name: leta
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: vrste
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: integer
            format: int64
      - name: kljucnebesede
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: udk
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        "200":
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  type: string
                x-content-type: '*/*'
      x-openapi-router-controller: swagger_server.controllers.oss_controller
components:
  schemas:
    TerminoloskiKandidat:
      type: object
      properties:
        kandidat:
          type: string
        kanonicnaoblika:
          type: string
        POSoznake:
          type: string
        nosilnautez:
          type: number
          format: float
        podporneutezi:
          type: array
          items:
            type: number
            format: float
        pogostostpojavljanja:
          type: array
          items:
            type: integer
            format: int64
      example:
        podporneutezi:
        - 6.0274563
        - 6.0274563
        pogostostpojavljanja:
        - 1
        - 1
        POSoznake: POSoznake
        kanonicnaoblika: kanonicnaoblika
        nosilnautez: 0.8008282
        kandidat: kandidat
    JobResponse:
      required:
      - finished_job
      type: object
      properties:
        job_status:
          type: string
          enum:
          - waiting in que
          - currently processing
          - finished processing
        finished_on:
          type: string
          format: date-time
        started_on:
          type: string
          format: date-time
        created_on:
          type: string
          format: date-time
        job_result:
          type: string
      example:
        job_status: waiting in que
        started_on: 2000-01-23T04:56:07.000+00:00
        created_on: 2000-01-23T04:56:07.000+00:00
        finished_on: 2000-01-23T04:56:07.000+00:00
        job_result: job_result
    oznaciBesediloAsync_body:
      type: object
      properties:
        besedilo:
          type: string
    datotekaVBesediloAsync_body:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          format: binary
    datotekaVConlluAsync_body:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          format: binary
    datotekaVConlluAsync_ocr_body:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          format: binary
    datotekaVBesediloAsync_ocr_body:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          format: binary
    izlusciSync_body:
      type: object
      properties:
        conllus:
          type: array
          items:
            type: string
        prepovedaneBesede:
          type: array
          items:
            type: string
    izlusciAsync_body:
      type: object
      properties:
        conllus:
          type: array
          items:
            type: string
        prepovedaneBesede:
          type: array
          items:
            type: string
    datotekaVBesediloSync_body:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          format: binary
    datotekaVBesediloSync_ocr_body:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          format: binary
    datotekaVConlluSync_body:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          format: binary
    datotekaVConlluSync_ocr_body:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          format: binary

