Repository: cxf
Updated Branches:
  refs/heads/master ea618d7af -> 4799fef82


Fixing Sagger2 systests


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4799fef8
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4799fef8
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4799fef8

Branch: refs/heads/master
Commit: 4799fef822a96f5d1b2827d5cc42ab886fd4e673
Parents: ea618d7
Author: Francesco Chicchiriccò <ilgro...@apache.org>
Authored: Fri Mar 18 15:51:13 2016 +0100
Committer: Francesco Chicchiriccò <ilgro...@apache.org>
Committed: Fri Mar 18 17:14:29 2016 +0100

----------------------------------------------------------------------
 .../AbstractSwagger2ServiceDescriptionTest.java |  1 +
 ...gger2NonAnnotatedServiceDescriptionTest.java |  2 +-
 .../systest/jaxrs/description/swagger2-json.txt |  2 +-
 .../jaxrs/description/swagger2-noano-yaml.txt   |  4 +-
 .../systest/jaxrs/description/swagger2-yaml.txt | 51 ++++++++++++--------
 5 files changed, 37 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4799fef8/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
----------------------------------------------------------------------
diff --git 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
index 3332f47..bf4b168 100644
--- 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
+++ 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
@@ -55,6 +55,7 @@ public abstract class AbstractSwagger2ServiceDescriptionTest 
extends AbstractBus
             this.runAsFilter = runAsFilter;
         }
         
+        @Override
         protected void run() {
             final JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
             sf.setResourceClasses(BookStoreSwagger2.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/4799fef8/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java
----------------------------------------------------------------------
diff --git 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java
 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java
index f47af93..dd56fe2 100644
--- 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java
+++ 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/Swagger2NonAnnotatedServiceDescriptionTest.java
@@ -77,6 +77,6 @@ public class Swagger2NonAnnotatedServiceDescriptionTest 
extends AbstractSwagger2
 
     @Override
     protected String getExpectedFileYaml() {
-        return "swagger2-noano-json.txt";
+        return "swagger2-noano-yaml.txt";
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4799fef8/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt
----------------------------------------------------------------------
diff --git 
a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt
 
b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt
index a1317de..0df74e4 100644
--- 
a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt
+++ 
b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt
@@ -1 +1 @@
-{"swagger":"2.0","info":{"description":"The 
Application","version":"1.0.0","title":"Sample REST 
Application","contact":{"name":"us...@cxf.apache.org"},"license":{"name":"Apache
 2.0 
License","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"localhost:%s","basePath":"/","tags":[{"name":"bookstore"}],"paths":{"/bookstore":{"get":{"tags":["bookstore"],"summary":"Get
 books","description":"Get 
books","operationId":"getBooks","produces":["application/json"],"parameters":[{"name":"page","in":"query","description":"Page
 to 
fetch","required":true,"type":"integer","default":1,"format":"int32"}],"responses":{"200":{"description":"successful
 
operation","schema":{"type":"array","items":{"$ref":"#/definitions/Book"}}}}}},"/bookstore/{id}":{"get":{"tags":["bookstore"],"summary":"Get
 book by Id","description":"Get book by 
Id","operationId":"getBook","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int
 64"}],"responses":{"200":{"description":"successful 
operation","schema":{"$ref":"#/definitions/Book"}}}},"delete":{"tags":["bookstore"],"summary":"Delete
 book","description":"Delete 
book","operationId":"delete","parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"string"}],"responses":{"default":{"description":"successful
 
operation"}}}}},"definitions":{"Book":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"integer","format":"int64"}},"xml":{"name":"Book"}}}}
+{"swagger":"2.0","info":{"description":"The 
Application","version":"1.0.0","title":"Sample REST 
Application","contact":{"name":"us...@cxf.apache.org"},"license":{"name":"Apache
 2.0 
License","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"localhost:%s","basePath":"/","tags":[{"name":"bookstore"}],"paths":{"/bookstore":{"get":{"operationId":"getBooks","produces":["application/json"],"parameters":[{"name":"page","in":"query","required":false,"type":"integer","default":1,"format":"int32"}],"responses":{"default":{"description":"successful
 
operation"}}}},"/bookstore/name/{id}":{"get":{"operationId":"getBookName","parameters":[{"name":"id","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"successful
 
operation","schema":{"type":"string"},"headers":{}}}}},"/bookstore/names":{"get":{"operationId":"getBookNames","produces":["application/json"],"parameters":[{"name":"page","in":"query","required":false,"type":"integer","default":1,"format":"int3
 2"}],"responses":{"default":{"description":"successful 
operation"}}}},"/bookstore/{id}":{"get":{"operationId":"getBook","produces":["application/json"],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful
 
operation","schema":{"$ref":"#/definitions/Book"},"headers":{}}}},"delete":{"operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"type":"string"}],"responses":{"default":{"description":"successful
 
operation"}}}}},"definitions":{"Book":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"integer","format":"int64"}},"xml":{"name":"Book"}}}}

http://git-wip-us.apache.org/repos/asf/cxf/blob/4799fef8/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt
----------------------------------------------------------------------
diff --git 
a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt
 
b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt
index 8bd33ee..5ef0eb4 100644
--- 
a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt
+++ 
b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-noano-yaml.txt
@@ -29,12 +29,14 @@ paths:
   /bookstore/names:
     get:
       operationId: "getBookNames"
+      produces:
+      - "application/json"
       parameters:
       - name: "page"
         in: "query"
         required: false
         type: "integer"
-        default: "1"
+        default: 1
         format: "int32"
       responses:
         default:

http://git-wip-us.apache.org/repos/asf/cxf/blob/4799fef8/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt
----------------------------------------------------------------------
diff --git 
a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt
 
b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt
index 75c34d0..022efbd 100644
--- 
a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt
+++ 
b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt
@@ -16,41 +16,56 @@ tags:
 paths:
   /bookstore:
     get:
-      tags:
-      - "bookstore"
-      summary: "Get books"
-      description: "Get books"
       operationId: "getBooks"
       produces:
       - "application/json"
       parameters:
       - name: "page"
         in: "query"
-        description: "Page to fetch"
-        required: true
+        required: false
         type: "integer"
-        default: "1"
+        default: 1
         format: "int32"
       responses:
+        default:
+          description: "successful operation"
+  /bookstore/name/{id}:
+    get:
+      operationId: "getBookName"
+      parameters:
+      - name: "id"
+        in: "path"
+        required: true
+        type: "string"
+      responses:
         200:
           description: "successful operation"
           schema:
-            type: "array"
-            items:
-              $ref: "#/definitions/Book"
+            type: "string"
+          headers: {}
+  /bookstore/names:
+    get:
+      operationId: "getBookNames"
+      produces:
+      - "application/json"
+      parameters:
+      - name: "page"
+        in: "query"
+        required: false
+        type: "integer"
+        default: 1
+        format: "int32"
+      responses:
+        default:
+          description: "successful operation"
   /bookstore/{id}:
     get:
-      tags:
-      - "bookstore"
-      summary: "Get book by Id"
-      description: "Get book by Id"
       operationId: "getBook"
       produces:
       - "application/json"
       parameters:
       - name: "id"
         in: "path"
-        description: "id"
         required: true
         type: "integer"
         format: "int64"
@@ -59,16 +74,12 @@ paths:
           description: "successful operation"
           schema:
             $ref: "#/definitions/Book"
+          headers: {}
     delete:
-      tags:
-      - "bookstore"
-      summary: "Delete book"
-      description: "Delete book"
       operationId: "delete"
       parameters:
       - name: "id"
         in: "path"
-        description: "id"
         required: true
         type: "string"
       responses:

Reply via email to