changeset 302:5e79312c8075

Fix YAML file inconsistencies The new SwaggerCombine utility caught several inconsistencies in the Swagger definitions, almost always defaults/required issues. This patch fixes those issues. Reviewed-by: sgehwolf Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025568.html
author Simon Tooke <stooke@redhat.com>
date Mon, 30 Oct 2017 09:51:28 -0400
parents f72a7db944c9
children ec8316f2d020
files services/jvm-byteman/src/main/resources/jvm-byteman-swagger.yaml services/jvm-compiler/src/main/resources/jvm-compiler-swagger.yaml services/schema/src/main/resources/schema-swagger.yaml
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/services/jvm-byteman/src/main/resources/jvm-byteman-swagger.yaml	Thu Oct 26 17:54:03 2017 +0200
+++ b/services/jvm-byteman/src/main/resources/jvm-byteman-swagger.yaml	Mon Oct 30 09:51:28 2017 -0400
@@ -206,21 +206,27 @@
     in: query
     description: Limit of items to return. Example '1'
     type: integer
+    required: false
+    default: 1
   offset:
     name: offset
     in: query
     description: Offset of items to return. Example '0'
     type: integer
+    required: false
+    default: 0
   sort:
     name: sort
     in: query
     description: Sort string. Comma separated list of fields prefixed with '+' for ascending or '-' for descending. Example '?s=+a,-b' Fields use dot notation for embedded documents. Example 'outer.inner' refers to field inner contained in field outer.
     type: string
+    required: false
   query:
     name: query
     in: query
     description: Query string. Comma separated list of key, comparator, value pairs. Comparator supports '==', '<=', '>=', '<', '>', '!='. Example '?q=a==b,c!=d'. Keys are fields in documents and use dot notation for embedded documents. Example 'outer.inner' refers to field inner contained in field outer.
     type: string
+    required: false
   include:
     name: include
     in: query
--- a/services/jvm-compiler/src/main/resources/jvm-compiler-swagger.yaml	Thu Oct 26 17:54:03 2017 +0200
+++ b/services/jvm-compiler/src/main/resources/jvm-compiler-swagger.yaml	Mon Oct 30 09:51:28 2017 -0400
@@ -172,7 +172,7 @@
     in: query
     description: Offset of items to return. Example '0'
     type: integer
-    required: true
+    required: false
     default: 0
   sort:
     name: sort
--- a/services/schema/src/main/resources/schema-swagger.yaml	Thu Oct 26 17:54:03 2017 +0200
+++ b/services/schema/src/main/resources/schema-swagger.yaml	Mon Oct 30 09:51:28 2017 -0400
@@ -36,7 +36,7 @@
         '200':
           description: OK
           schema:
-            $ref: '#/definitions/swagger-response'
+            $ref: '#/definitions/swagger-response-yaml'
 definitions:
   swagger-response-json:
     type: object