141 lines
4.0 KiB
YAML
141 lines
4.0 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
version: 0.1.0
|
|
title: Schemata for command instructions
|
|
servers: []
|
|
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
|
|
required:
|
|
- name
|
|
properties: &ref_command_properties
|
|
name:
|
|
$ref: '#/components/schemas/EnumAlgorithmNames'
|
|
additionalProperties: true
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
# Command - Algorithm: Tarjan
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
CommandTarjan:
|
|
description: |-
|
|
Instructions for execution of Tarjan-Algorithm
|
|
type: object
|
|
required:
|
|
- name
|
|
properties:
|
|
<<: *ref_command_properties
|
|
# required:
|
|
# properties:
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
# Command - Algorithm: TSP
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
CommandTsp:
|
|
description: |-
|
|
Instructions for execution of TSP-Algorithm
|
|
type: object
|
|
required:
|
|
- name
|
|
- optimise
|
|
- dist
|
|
properties:
|
|
<<: *ref_command_properties
|
|
dist:
|
|
type: array
|
|
items:
|
|
type: array
|
|
items:
|
|
type: number
|
|
optimise:
|
|
$ref: '#/components/schemas/EnumTSPOptimise'
|
|
verbose:
|
|
type: boolean
|
|
default: false
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
# Command - Algorithm: Hirschberg
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
CommandHirschberg:
|
|
description: |-
|
|
Instructions for execution of Hirschberg-Algorithm
|
|
type: object
|
|
required:
|
|
- name
|
|
- horizontal
|
|
- vertical
|
|
properties:
|
|
<<: *ref_command_properties
|
|
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
|
|
verbose:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/EnumHirschbergVerbosity'
|
|
default: []
|
|
show:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/EnumHirschbergShow'
|
|
default: []
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
# 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
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
# Enum Hirschberg - Verbosity options
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
EnumHirschbergVerbosity:
|
|
description: |-
|
|
Enumeration of verbosity options for Hirschberg
|
|
type: string
|
|
enum:
|
|
- COSTS
|
|
- MOVES
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
# Enum Hirschberg - display options
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
EnumHirschbergShow:
|
|
description: |-
|
|
Enumeration of verbosity options for Hirschberg
|
|
type: string
|
|
enum:
|
|
- TREE
|
|
- ATOMS
|