Improve Swagger DMaaP Mediator Producer
[nonrtric.git] / dmaap-mediator-producer / api / swagger.yaml
similarity index 55%
rename from dmaap-mediator-producer/docs/swagger.yaml
rename to dmaap-mediator-producer/api/swagger.yaml
index 501b062..adf70a8 100644 (file)
@@ -1,15 +1,46 @@
 definitions:
-  jobs.BufferTimeout:
+  "":
+    properties:
+      registeredStatus:
+        description: The registration status of the producer in Information Coordinator
+          Service. Either `registered` or `not registered`
+        example: registered
+        type: string
+    type: object
+  BufferTimeout:
     properties:
       maxSize:
         type: integer
       maxTimeMiliseconds:
         type: integer
     type: object
-  jobs.JobInfo:
+  ErrorInfo:
+    properties:
+      detail:
+        description: A human-readable explanation specific to this occurrence of the
+          problem.
+        example: Info job type not found
+        type: string
+      instance:
+        description: A URI reference that identifies the specific occurrence of the
+          problem.
+        type: string
+      status:
+        description: The HTTP status code generated by the origin server for this
+          occurrence of the problem.
+        example: 400
+        type: integer
+      title:
+        description: A short, human-readable summary of the problem type.
+        type: string
+      type:
+        description: A URI reference that identifies the problem type.
+        type: string
+    type: object
+  JobInfo:
     properties:
       info_job_data:
-        $ref: '#/definitions/jobs.Parameters'
+        $ref: '#/definitions/Parameters'
       info_job_identity:
         type: string
       info_type_identity:
@@ -21,10 +52,10 @@ definitions:
       target_uri:
         type: string
     type: object
-  jobs.Parameters:
+  Parameters:
     properties:
       bufferTimeout:
-        $ref: '#/definitions/jobs.BufferTimeout'
+        $ref: '#/definitions/BufferTimeout'
     type: object
 info:
   contact: {}
@@ -51,9 +82,13 @@ paths:
         "200":
           description: ""
         "400":
-          description: Bad Request
+          description: Problem as defined in https://tools.ietf.org/html/rfc7807
+          headers:
+            Content-Type:
+              description: application/problem+json
+              type: string
           schema:
-            type: string
+            $ref: '#/definitions/ErrorInfo'
       summary: Set log level
       tags:
       - Admin
@@ -61,9 +96,13 @@ paths:
     get:
       description: Get the status of the producer. Will show if the producer has registered
         in ICS.
+      produces:
+      - application/json
       responses:
         "200":
-          description: ""
+          description: OK
+          schema:
+            $ref: '#/definitions/'
       summary: Get status
       tags:
       - Data producer (callbacks)
@@ -78,14 +117,18 @@ paths:
         name: user
         required: true
         schema:
-          $ref: '#/definitions/jobs.JobInfo'
+          $ref: '#/definitions/JobInfo'
       responses:
         "200":
           description: ""
         "400":
-          description: Bad Request
+          description: Problem as defined in https://tools.ietf.org/html/rfc7807
+          headers:
+            Content-Type:
+              description: application/problem+json
+              type: string
           schema:
-            type: string
+            $ref: '#/definitions/ErrorInfo'
       summary: Add info job
       tags:
       - Data producer (callbacks)