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

[kibble] branch master updated (187759a -> c3c8904)

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

humbedooh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git.


    from 187759a  Add scroll feature to the ES wrapper
     new 90038d1  Add examples for adding sources via API
     new 4656532  regen OpenAPI yaml
     new c3c8904  Don't require DB connection for API doc printing

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 api/handler.py                                     |  3 +-
 api/pages/sources.py                               |  3 +-
 api/yaml/openapi.yaml                              | 28 +++++++++++++++--
 .../openapi/components/schemas/SourceListAdd.yaml  | 36 ++++++++++++++++++++++
 4 files changed, 65 insertions(+), 5 deletions(-)
 create mode 100644 api/yaml/openapi/components/schemas/SourceListAdd.yaml


[kibble] 03/03: Don't require DB connection for API doc printing

Posted by hu...@apache.org.
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/kibble.git

commit c3c89044bbb44092551a5bad54015f4d48ded2cd
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Thu Sep 13 17:12:31 2018 +0200

    Don't require DB connection for API doc printing
---
 api/handler.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/api/handler.py b/api/handler.py
index 82485a7..d767e69 100644
--- a/api/handler.py
+++ b/api/handler.py
@@ -47,7 +47,7 @@ if __name__ != '__main__':
 config = yaml.load(open("yaml/kibble.yaml"))
 
 # Instantiate database connections
-DB = plugins.database.KibbleDatabase(config)
+DB = None
 
 # Load Open API specifications
 KibbleOpenAPI = plugins.openapi.OpenAPI("yaml/openapi.yaml")
@@ -159,6 +159,7 @@ def application(environ, start_response):
     Checks against the pages library, and if submod found, runs
     it and returns the output.
     """
+    DB = plugins.database.KibbleDatabase(config)
     path = environ.get('PATH_INFO', '')
     for regex, function in urls:
         m = re.match(regex, path)


[kibble] 02/03: regen OpenAPI yaml

Posted by hu...@apache.org.
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/kibble.git

commit 46565329d42e86b215aa3bd5883a4ef78a8818a1
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Thu Sep 13 17:12:14 2018 +0200

    regen OpenAPI yaml
---
 api/yaml/openapi.yaml | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/api/yaml/openapi.yaml b/api/yaml/openapi.yaml
index 853543a..bc61cc2 100644
--- a/api/yaml/openapi.yaml
+++ b/api/yaml/openapi.yaml
@@ -218,6 +218,31 @@ components:
           type: array
       required:
       - sources
+    SourceListAdd:
+      properties:
+        okay:
+          type: boolean
+        organisation:
+          description: The organisation these sources belong to
+          type: string
+        sources:
+          description: The sources to add
+          example:
+            sources:
+            - optauth:
+                password: githubpass
+                username: githubuser
+              sourceURL: https://github.com/apache/kibble.git
+              type: github
+            - optauth:
+                cookie: ponycookie
+              sourceURL: https://lists.apache.org/list.html?dev@httpd.apache.org
+              type: ponymail
+          items:
+            $ref: '#/components/schemas/Source'
+          type: array
+      required:
+      - sources
     SourceType:
       properties:
         description:
@@ -2981,8 +3006,7 @@ paths:
         content:
           application/json:
             schema:
-              $ref: '#/components/schemas/SourceList'
-        description: New source data to add
+              $ref: '#/components/schemas/SourceListAdd'
         required: true
       responses:
         '200':


[kibble] 01/03: Add examples for adding sources via API

Posted by hu...@apache.org.
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/kibble.git

commit 90038d105ecf9604cc8a9f7ae476ea3d3461176d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Thu Sep 13 17:12:07 2018 +0200

    Add examples for adding sources via API
---
 api/pages/sources.py                               |  3 +-
 .../openapi/components/schemas/SourceListAdd.yaml  | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/api/pages/sources.py b/api/pages/sources.py
index 786d8e6..3424528 100644
--- a/api/pages/sources.py
+++ b/api/pages/sources.py
@@ -96,8 +96,7 @@
 #     content:
 #       application/json:
 #         schema:
-#           $ref: '#/components/schemas/SourceList'
-#     description: New source data to add
+#           $ref: '#/components/schemas/SourceListAdd'
 #     required: true
 #   responses:
 #     '200':
diff --git a/api/yaml/openapi/components/schemas/SourceListAdd.yaml b/api/yaml/openapi/components/schemas/SourceListAdd.yaml
new file mode 100644
index 0000000..8d82be0
--- /dev/null
+++ b/api/yaml/openapi/components/schemas/SourceListAdd.yaml
@@ -0,0 +1,36 @@
+########################################################################
+# SourceList                                                           #
+########################################################################
+properties:
+  okay:
+    type: boolean
+  organisation:
+    description: The organisation these sources belong to
+    type: string
+  sources:
+    description: The sources to add
+    items:
+      $ref: '#/components/schemas/Source'
+    type: array
+    example:
+            {"sources": [
+              {
+               "sourceURL": "https://github.com/apache/kibble.git",
+               "type": "github",
+               "optauth": {
+                    "username": "githubuser",
+                    "password": "githubpass"
+                   }
+               },
+               {
+               "sourceURL": "https://lists.apache.org/list.html?dev@httpd.apache.org",
+               "type": "ponymail",
+               "optauth": {
+                    "cookie": "ponycookie"
+                   }
+               }
+    
+              ]
+            }
+required:
+- sources