You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/08/13 22:02:00 UTC

[06/11] allura git commit: [#6797] fix incorrect includes. Combine forum & discussion endpoints into one and fix up

[#6797] fix incorrect includes.  Combine forum & discussion endpoints into one and fix up


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/2866eba4
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/2866eba4
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/2866eba4

Branch: refs/heads/db/6797
Commit: 2866eba4a0c0b7063cb2ed09c452ea17a1fa18ca
Parents: 929a3f2
Author: Dave Brondsema <da...@brondsema.net>
Authored: Mon Aug 10 18:30:01 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Aug 11 12:03:58 2015 -0400

----------------------------------------------------------------------
 Allura/docs/api-rest/api.raml | 105 ++++++++++++++++---------------------
 1 file changed, 45 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/2866eba4/Allura/docs/api-rest/api.raml
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/api.raml b/Allura/docs/api-rest/api.raml
index b123871..78402a2 100755
--- a/Allura/docs/api-rest/api.raml
+++ b/Allura/docs/api-rest/api.raml
@@ -115,12 +115,6 @@ baseUriParameters:
         get:
           description: |
             Returns a list of posts, including title and API url.
-          responses:
-            200:
-              body:
-                application/json:
-                  schema: !include schemas/blog.json
-                  example: !include examples/blog.json
         post:
           description: |
             Creates a new blog post.
@@ -208,74 +202,37 @@ baseUriParameters:
                 default: read
                 enum: [admin, configure, moderate, post, unmoderated_post, read, write]
 
-      /{forum}:
-        description: |
-          A list of forums
-        type: {
-            tool: {
-            example: !include examples/page.json,
-            schema: !include schemas/page.json
-            }
-          }
-
-        displayName: forum
-        uriParameters:
-         forum:
-           displayName: Forum Name
-           type: string
-           example: general
-           description: |
-             Returns a list of forums, including name, description, num_posts, API URL, and last_post details
-
-             To view more than 100 threads, or 100 posts in a thread, use the pagination support of the API by adding ?page=1 etc. to the URL.
-
-        /forum:
-          description: |
-            returns a limited list of topics in the forum, with fields for subject, num_replies, API URL, and last_post
-          get:
-          /{slug}:
-            description: |
-              returns a limited list of posts in the thread, with fields for author, text, and timestamp. Nested posts (i.e. a reply to a post) can be determined by the slug structure. For example, "slug": "0a0b/9f00" is a reply to the post with "slug": "0a0b"
-            get:
-
-        /has_access:
-          type: permission
-          get:
-            queryParameters:
-              perm:
-                displayName: Permission
-                required: true
-                type: string
-                example: post
-                default: read
-                enum: [admin, configure, moderate, post, unmoderated_post, read]
-
       /{discussion}:
         description: |
           Represents the **Discussion Tool**.
         type: {
-            tool: {
+          tool: {
             schema: !include schemas/discussion.json,
             example: !include examples/discussion.json
-
             }
           }
 
         displayName: Discussion
         uriParameters:
          discussion:
-           displayName: Discussion Name
+           displayName: Discussion Tool Name
            type: string
            example: "discussion"
+        get:
+          description: |
+            Returns a list of forums, including name, description, num_topics, and last_post details
+          is: [pageable]
 
         /{forum}:
+          description: |
+            Represents a forum within a Discussion tool.
           type: {
-              tool: {
-                example: !include examples/page.json,
-                schema: !include schemas/page.json
-              }
+            tool: {
+              # FIXME
+              example: !include examples/page.json,
+              schema: !include schemas/page.json
             }
-
+          }
           displayName: forum
           uriParameters:
            forum:
@@ -283,8 +240,31 @@ baseUriParameters:
              type: string
              example: general
 
+          get:
+            is: [pageable]
+            description: |
+              returns a limited list of topics in the forum, with fields for subject, num_replies, API URL, and last_post
+              To view more than 100 threads, or 100 posts in a thread, use the pagination support of the API by adding ?page=1 etc. to the URL.
+
+          /thread/{thread}:
+            description: |
+              Represents a thread of posts.
+            get:
+              is: [pageable]
+              description: |
+                returns a list of posts in the thread, with fields for author, text, and timestamp. Nested posts (i.e. a reply to a post) can be determined by the slug structure. For example, "slug": "0a0b/9f00" is a reply to the post with "slug": "0a0b"
+
         /has_access:
           type: permission
+          get:
+            queryParameters:
+              perm:
+                displayName: Permission
+                required: true
+                type: string
+                example: post
+                default: read
+                enum: [admin, configure, moderate, post, unmoderated_post, read]
 
       /{wiki}:
         description: |
@@ -355,7 +335,7 @@ baseUriParameters:
         type: {
             tool: {
             example: !include examples/tickets.json,
-            schema: !include schemas/ticket.json
+            schema: !include schemas/tickets.json
             }
           }
         is: [pageable]
@@ -470,7 +450,6 @@ baseUriParameters:
             tool: {
             example: !include examples/ticket.json,
             schema: !include schemas/ticket.json
-
             }
           }
           displayName: Ticket Number
@@ -557,7 +536,7 @@ baseUriParameters:
             type: {
               typedCollection: {
               example: !include examples/webhooks.json,
-              schema: !include schemas/webhook.json
+              schema: !include schemas/webhooks.json
               }
             }
             description: |
@@ -585,6 +564,12 @@ baseUriParameters:
                         required: true
                         type: string
               /{id}:
+                type: {
+                  tool: {
+                  example: !include examples/webhook.json,
+                  schema: !include schemas/webhook.json
+                  }
+                }
                 uriParameters:
                   id:
                     type: string
@@ -634,7 +619,7 @@ baseUriParameters:
                     type: string
                   mount_point:
                     description: |
-                      The section of the url relitive to your project. For example: /p/your_project/{mount_point}
+                      The section of the url relative to your project. For example: /p/your_project/{mount_point}
                     example: git
                     type: string
                     required: true