2022-06-10 11:50:59 +02:00
|
|
|
openapi: 3.0.3
|
|
|
|
info:
|
|
|
|
version: 0.1.0
|
|
|
|
title: Schemata for command instructions
|
2022-06-11 16:07:23 +02:00
|
|
|
servers:
|
|
|
|
- url: "."
|
2022-06-10 11:50:59 +02:00
|
|
|
paths: {}
|
|
|
|
components:
|
|
|
|
schemas:
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Commands
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Commands:
|
|
|
|
description: |-
|
|
|
|
List of commands to test algorithms/datastructures.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/Command"
|
|
|
|
default: []
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Command
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Command:
|
|
|
|
description: |-
|
|
|
|
Instructions for command to call
|
2022-06-11 16:07:23 +02:00
|
|
|
type: object
|
2022-06-10 11:50:59 +02:00
|
|
|
required:
|
|
|
|
- name
|
2022-06-11 16:07:23 +02:00
|
|
|
properties:
|
2022-06-10 11:50:59 +02:00
|
|
|
name:
|
|
|
|
$ref: '#/components/schemas/EnumAlgorithmNames'
|
|
|
|
additionalProperties: true
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Command - Algorithm: Tarjan
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
CommandTarjan:
|
|
|
|
description: |-
|
|
|
|
Instructions for execution of Tarjan-Algorithm
|
|
|
|
type: object
|
|
|
|
required:
|
|
|
|
- name
|
2022-06-10 16:04:30 +02:00
|
|
|
- nodes
|
|
|
|
- edges
|
2022-06-10 11:50:59 +02:00
|
|
|
properties:
|
2022-06-11 16:07:23 +02:00
|
|
|
name:
|
|
|
|
$ref: '#/components/schemas/EnumAlgorithmNames'
|
2022-06-10 16:04:30 +02:00
|
|
|
nodes:
|
2022-06-10 16:05:15 +02:00
|
|
|
type: array
|
2022-06-11 16:07:23 +02:00
|
|
|
items:
|
|
|
|
anyOf:
|
|
|
|
- type: integer
|
|
|
|
- type: number
|
|
|
|
- type: string
|
2022-06-10 16:04:30 +02:00
|
|
|
edges:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: array
|
|
|
|
minItems: 2
|
|
|
|
maxItems: 2
|
2022-06-11 16:07:23 +02:00
|
|
|
items:
|
|
|
|
anyOf:
|
|
|
|
- type: integer
|
|
|
|
- type: number
|
|
|
|
- type: string
|
2022-06-10 11:50:59 +02:00
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Command - Algorithm: TSP
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
CommandTsp:
|
|
|
|
description: |-
|
|
|
|
Instructions for execution of TSP-Algorithm
|
|
|
|
type: object
|
|
|
|
required:
|
|
|
|
- name
|
|
|
|
- optimise
|
|
|
|
- dist
|
|
|
|
properties:
|
2022-06-11 16:07:23 +02:00
|
|
|
name:
|
|
|
|
$ref: '#/components/schemas/EnumAlgorithmNames'
|
2022-06-10 11:50:59 +02:00
|
|
|
dist:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: number
|
|
|
|
optimise:
|
|
|
|
$ref: '#/components/schemas/EnumTSPOptimise'
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Command - Algorithm: Hirschberg
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
CommandHirschberg:
|
|
|
|
description: |-
|
|
|
|
Instructions for execution of Hirschberg-Algorithm
|
|
|
|
type: object
|
|
|
|
required:
|
|
|
|
- name
|
2022-06-10 12:44:04 +02:00
|
|
|
- word1
|
|
|
|
- word2
|
2022-06-10 11:50:59 +02:00
|
|
|
properties:
|
2022-06-11 16:07:23 +02:00
|
|
|
name:
|
|
|
|
$ref: '#/components/schemas/EnumAlgorithmNames'
|
2022-06-10 11:50:59 +02:00
|
|
|
word1:
|
|
|
|
description: Word that gets placed vertically in algorithm.
|
|
|
|
type: string
|
|
|
|
word2:
|
|
|
|
description: Word that gets placed horizontally in algorithm
|
|
|
|
type: string
|
|
|
|
once:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Enum Algorithm Names
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
EnumAlgorithmNames:
|
|
|
|
description: |-
|
|
|
|
Enumeration of possible algorithm options.
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- TARJAN
|
|
|
|
- TSP
|
|
|
|
- HIRSCHBERG
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# Enum TSP - Optimise Mode
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
EnumTSPOptimise:
|
|
|
|
description: |-
|
|
|
|
Enumeration of optimisation options for TSP
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- MIN
|
|
|
|
- MAX
|