From 4fa02a49628fb1b428202db4d3bd1db5127e7a0d Mon Sep 17 00:00:00 2001 From: raj_mathe Date: Sat, 11 Jun 2022 16:07:23 +0200 Subject: [PATCH] =?UTF-8?q?master=20>=20master:=20code=20py=20-=20schemata?= =?UTF-8?q?=20=C3=BCberarbeitet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/python/models/commands-schema.yaml | 26 +++++++++++++++++++------ code/python/models/config-schema.yaml | 5 +++-- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/code/python/models/commands-schema.yaml b/code/python/models/commands-schema.yaml index 097c3a0..de589b5 100644 --- a/code/python/models/commands-schema.yaml +++ b/code/python/models/commands-schema.yaml @@ -2,7 +2,8 @@ openapi: 3.0.3 info: version: 0.1.0 title: Schemata for command instructions -servers: [] +servers: + - url: "." paths: {} components: schemas: @@ -22,9 +23,10 @@ components: Command: description: |- Instructions for command to call + type: object required: - name - properties: &ref_command_properties + properties: name: $ref: '#/components/schemas/EnumAlgorithmNames' additionalProperties: true @@ -40,16 +42,26 @@ components: - nodes - edges properties: - <<: *ref_command_properties + name: + $ref: '#/components/schemas/EnumAlgorithmNames' nodes: type: array + items: + anyOf: + - type: integer + - type: number + - type: string edges: type: array items: - # $ref: '#/components/schemas/Edge' type: array minItems: 2 maxItems: 2 + items: + anyOf: + - type: integer + - type: number + - type: string # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Command - Algorithm: TSP # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -62,7 +74,8 @@ components: - optimise - dist properties: - <<: *ref_command_properties + name: + $ref: '#/components/schemas/EnumAlgorithmNames' dist: type: array items: @@ -83,7 +96,8 @@ components: - word1 - word2 properties: - <<: *ref_command_properties + name: + $ref: '#/components/schemas/EnumAlgorithmNames' word1: description: Word that gets placed vertically in algorithm. type: string diff --git a/code/python/models/config-schema.yaml b/code/python/models/config-schema.yaml index afac7bd..1bb0551 100644 --- a/code/python/models/config-schema.yaml +++ b/code/python/models/config-schema.yaml @@ -2,7 +2,8 @@ openapi: 3.0.3 info: version: 0.1.0 title: Schemata for config models -servers: [] +servers: + - url: "." paths: {} components: schemas: @@ -10,7 +11,7 @@ components: # Config # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Config: - descripton: |- + description: |- Data model for all parts of the configuration. type: object required: