master > master: code py - schemata überarbeitet

This commit is contained in:
RD 2022-06-11 16:07:23 +02:00
parent 38b477e0ad
commit 4fa02a4962
2 changed files with 23 additions and 8 deletions

View File

@ -2,7 +2,8 @@ openapi: 3.0.3
info: info:
version: 0.1.0 version: 0.1.0
title: Schemata for command instructions title: Schemata for command instructions
servers: [] servers:
- url: "."
paths: {} paths: {}
components: components:
schemas: schemas:
@ -22,9 +23,10 @@ components:
Command: Command:
description: |- description: |-
Instructions for command to call Instructions for command to call
type: object
required: required:
- name - name
properties: &ref_command_properties properties:
name: name:
$ref: '#/components/schemas/EnumAlgorithmNames' $ref: '#/components/schemas/EnumAlgorithmNames'
additionalProperties: true additionalProperties: true
@ -40,16 +42,26 @@ components:
- nodes - nodes
- edges - edges
properties: properties:
<<: *ref_command_properties name:
$ref: '#/components/schemas/EnumAlgorithmNames'
nodes: nodes:
type: array type: array
items:
anyOf:
- type: integer
- type: number
- type: string
edges: edges:
type: array type: array
items: items:
# $ref: '#/components/schemas/Edge'
type: array type: array
minItems: 2 minItems: 2
maxItems: 2 maxItems: 2
items:
anyOf:
- type: integer
- type: number
- type: string
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Command - Algorithm: TSP # Command - Algorithm: TSP
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -62,7 +74,8 @@ components:
- optimise - optimise
- dist - dist
properties: properties:
<<: *ref_command_properties name:
$ref: '#/components/schemas/EnumAlgorithmNames'
dist: dist:
type: array type: array
items: items:
@ -83,7 +96,8 @@ components:
- word1 - word1
- word2 - word2
properties: properties:
<<: *ref_command_properties name:
$ref: '#/components/schemas/EnumAlgorithmNames'
word1: word1:
description: Word that gets placed vertically in algorithm. description: Word that gets placed vertically in algorithm.
type: string type: string

View File

@ -2,7 +2,8 @@ openapi: 3.0.3
info: info:
version: 0.1.0 version: 0.1.0
title: Schemata for config models title: Schemata for config models
servers: [] servers:
- url: "."
paths: {} paths: {}
components: components:
schemas: schemas:
@ -10,7 +11,7 @@ components:
# Config # Config
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Config: Config:
descripton: |- description: |-
Data model for all parts of the configuration. Data model for all parts of the configuration.
type: object type: object
required: required: