You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@warble.apache.org by hu...@apache.org on 2018/06/25 03:12:13 UTC

[incubator-warble-server] 05/07: generate openapi yaml

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-server.git

commit 2fa6871d9051688695d83a54a4f3ba38771cae4d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Jun 24 22:06:03 2018 -0500

    generate openapi yaml
---
 api/yaml/openapi.yaml | 403 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 403 insertions(+)

diff --git a/api/yaml/openapi.yaml b/api/yaml/openapi.yaml
new file mode 100644
index 0000000..b3de7b6
--- /dev/null
+++ b/api/yaml/openapi.yaml
@@ -0,0 +1,403 @@
+
+# THIS IS PULLED FROM SCRIPTS AND AUTOGENERATED!
+# Please use openapi/combine.py to regenerate!
+openapi: 3.0.0
+info:
+  version: 1.0.0
+  description: This is the API specifications for interacting with the Warble Server.
+  title: Apache Warble API
+  license:
+    name: Apache 2.0
+    url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
+components:
+  schemas:
+    ActionCompleted:
+      properties:
+        message:
+          description: Acknowledgement message
+          example: Action completed
+          type: string
+      required:
+      - message
+    Empty:
+      properties:
+        id:
+          description: optional object ID
+          type: string
+        page:
+          description: optional page id
+          type: string
+      required: []
+    Error:
+      properties:
+        code:
+          description: HTTP Error Code
+          example: 403
+          format: int16
+          type: integer
+        reason:
+          description: Human readable error message
+          example: You need to be logged in to view this endpoint!
+          type: string
+      required:
+      - code
+      - reason
+    Timeseries:
+      properties:
+        interval:
+          type: string
+        okay:
+          type: boolean
+        timeseries:
+          items:
+            $ref: '#/components/schemas/TimeseriesObject'
+          type: array
+    TimeseriesObject:
+      properties:
+        $item:
+          description: A timeseries object
+          example: 50
+          type: integer
+        $otheritem:
+          description: A timeseries object
+          example: 26
+          type: integer
+        date:
+          description: Seconds since UNIX epoch
+          example: 1508273
+          type: integer
+      required:
+      - date
+    UserAccount:
+      properties:
+        displayname:
+          description: A display name (e.g. full name) for the account
+          example: Warble User
+          type: string
+        email:
+          description: Desired username (email address)
+          example: guest@warble.xyz
+          type: string
+        password:
+          description: Desired password for the account
+          example: warbledemo
+          type: string
+      required:
+      - email
+      - password
+      - displayname
+    UserCredentials:
+      properties:
+        password:
+          description: User password
+          example: warbledemo
+          type: string
+        username:
+          description: Username (email?)
+          example: admin
+          type: string
+      required:
+      - username
+      - password
+    WidgetApp:
+      properties:
+        blocks:
+          description: Size (width) in UI blocks of the app
+          example: 4
+          type: integer
+        datatype:
+          description: The top category of this data
+          example: repo
+          type: string
+        name:
+          description: The title of the widget app
+          example: Widget Title
+          type: string
+        representation:
+          description: The visual representation style of this widget
+          example: donut
+          type: string
+        source:
+          description: The API endpoint to get data from
+          example: code-evolution
+          type: string
+        target:
+          type: string
+        text:
+          description: Text to insert into the widget (if paragraph type widget)
+          type: string
+        type:
+          description: The type of widget
+          example: My Widget
+          type: string
+      required:
+      - type
+      - name
+      - blocks
+    WidgetDesign:
+      properties:
+        rows:
+          items:
+            $ref: '#/components/schemas/WidgetRow'
+          type: array
+        title:
+          type: string
+    WidgetRow:
+      properties:
+        children:
+          items:
+            $ref: '#/components/schemas/WidgetApp'
+          type: array
+        name:
+          type: string
+    defaultWidgetArgs:
+      properties:
+        author:
+          description: Turns on author view for code results, as opposed to the default
+            committer view
+          type: boolean
+        collapse:
+          description: for some widgets, this collapses sources based on a regex
+          type: string
+        distinguish:
+          description: Enables distinguishing different types of data objects, subject
+            to the individual API endpoint
+          example: false
+          type: boolean
+        email:
+          description: filter sources based on an email (a person)
+          type: string
+        from:
+          description: If specified, compile data from this timestamp onwards
+          example: 1400000000
+          type: integer
+        interval:
+          description: If fetching histograms, this specifies the interval to pack
+            figures into. Can be day, week, month, quarter or year
+          example: month
+          type: string
+        links:
+          description: for relationship maps, this denotes the minimum link strength
+            (no. of connections) that makes up a link.
+          type: integer
+        page:
+          type: string
+        quick:
+          description: Turns on quick data for some endpoints, returning only sparse
+            data (thus less traffic)
+          example: false
+          type: boolean
+        relative:
+          description: Enables relative comparison mode for API endpoints that have
+            this feature.
+          example: false
+          type: boolean
+        search:
+          description: for some widgets, this enables sub-filtering based on searches
+          type: string
+        source:
+          description: If specified, only compile data on this specific sourceID
+          example: abcdef12345678
+          type: string
+        sources:
+          description: for some widget, this fetches all sources
+          type: boolean
+        span:
+          description: For factor charts, denotes the number of months to base factors
+            on from
+          example: 2
+          type: integer
+        subfilter:
+          description: Quickly defined view by sub-filtering the existing view and
+            matching on sourceURLs
+          type: string
+        to:
+          description: If specified, only compile data up until here
+          example: 1503483273
+          type: integer
+        types:
+          description: If set, only return data from sources matching these types
+          example:
+          - jira
+          - bugzilla
+          type: array
+        unique:
+          description: Only compile data from unique commits, ignore duplicates
+          type: boolean
+        view:
+          description: ID Of optional view to use
+          example: abcdef12345678
+          type: string
+  securitySchemes:
+    APIKeyAuth:
+      in: headers
+      name: APIKey
+      type: apiKey
+    cookieAuth:
+      in: cookie
+      name: warble_session
+      type: apiKey
+paths:
+  /api/account:
+    delete:
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/UserName'
+        description: User ID
+        required: true
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ActionCompleted'
+          description: 200 response
+        default:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+          description: unexpected error
+      security:
+      - cookieAuth: []
+      summary: Delete an account
+    patch:
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/UserAccountEdit'
+        description: User credentials
+        required: true
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ActionCompleted'
+          description: 200 response
+        default:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+          description: unexpected error
+      summary: Edit an account
+    put:
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/UserAccount'
+        description: User credentials
+        required: true
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ActionCompleted'
+          description: 200 response
+        default:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+          description: unexpected error
+      summary: Create a new account
+  /api/session:
+    delete:
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/Empty'
+        description: Nada
+        required: true
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ActionCompleted'
+          description: Logout successful
+        default:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+          description: unexpected error
+      security:
+      - cookieAuth: []
+      summary: Log out (remove session)
+    get:
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/UserData'
+          description: 200 response
+        default:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+          description: unexpected error
+      security:
+      - cookieAuth: []
+      summary: Display your login details
+    put:
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/UserCredentials'
+        description: User credentials
+        required: true
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ActionCompleted'
+          description: Login successful
+          headers:
+            Set-Cookie:
+              schema:
+                example: 77488a26-23c2-4e29-94a1-6a0738f6a3ff
+                type: string
+        default:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+          description: unexpected error
+      summary: Log in
+  /api/widgets/{pageid}:
+    get:
+      parameters:
+      - description: Page ID to fetch design for
+        in: path
+        name: pageid
+        required: true
+        schema:
+          type: string
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/WidgetDesign'
+          description: 200 Response
+        default:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Error'
+          description: unexpected error
+      security:
+      - cookieAuth: []
+      summary: Shows the widget layout for a specific page


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org