You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by ku...@apache.org on 2024/08/23 03:39:21 UTC

(incubator-answer) 02/02: docs: Add render api

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

kumfo pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 6214fed8ae75ac01df5ec937348e295b032e29ed
Author: robin <ro...@rnode.me>
AuthorDate: Fri Aug 23 11:24:41 2024 +0800

    docs: Add render api
---
 docs/docs.go      | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 docs/swagger.json | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 docs/swagger.yaml | 31 ++++++++++++++++++++++++++++++-
 3 files changed, 132 insertions(+), 5 deletions(-)

diff --git a/docs/docs.go b/docs/docs.go
index daef6851..389f3bdf 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -4854,6 +4854,41 @@ const docTemplate = `{
                 }
             }
         },
+        "/answer/api/v1/render/config": {
+            "get": {
+                "description": "GetRenderConfig",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "PluginRender"
+                ],
+                "summary": "GetRenderConfig",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/handler.RespBody"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "$ref": "#/definitions/plugin.RenderConfig"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
         "/answer/api/v1/report": {
             "post": {
                 "security": [
@@ -7420,6 +7455,14 @@ const docTemplate = `{
                 }
             }
         },
+        "plugin.RenderConfig": {
+            "type": "object",
+            "properties": {
+                "select_theme": {
+                    "type": "string"
+                }
+            }
+        },
         "schema.AcceptAnswerReq": {
             "type": "object",
             "required": [
@@ -9257,10 +9300,16 @@ const docTemplate = `{
         },
         "schema.NotificationClearRequest": {
             "type": "object",
+            "required": [
+                "type"
+            ],
             "properties": {
                 "type": {
-                    "description": "inbox achievement",
-                    "type": "string"
+                    "type": "string",
+                    "enum": [
+                        "inbox",
+                        "achievement"
+                    ]
                 }
             }
         },
diff --git a/docs/swagger.json b/docs/swagger.json
index c7ad452e..3d6f07c8 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -4828,6 +4828,41 @@
                 }
             }
         },
+        "/answer/api/v1/render/config": {
+            "get": {
+                "description": "GetRenderConfig",
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "PluginRender"
+                ],
+                "summary": "GetRenderConfig",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/handler.RespBody"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "$ref": "#/definitions/plugin.RenderConfig"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
         "/answer/api/v1/report": {
             "post": {
                 "security": [
@@ -7394,6 +7429,14 @@
                 }
             }
         },
+        "plugin.RenderConfig": {
+            "type": "object",
+            "properties": {
+                "select_theme": {
+                    "type": "string"
+                }
+            }
+        },
         "schema.AcceptAnswerReq": {
             "type": "object",
             "required": [
@@ -9231,10 +9274,16 @@
         },
         "schema.NotificationClearRequest": {
             "type": "object",
+            "required": [
+                "type"
+            ],
             "properties": {
                 "type": {
-                    "description": "inbox achievement",
-                    "type": "string"
+                    "type": "string",
+                    "enum": [
+                        "inbox",
+                        "achievement"
+                    ]
                 }
             }
         },
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 1cf29862..d2d43504 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -135,6 +135,11 @@ definitions:
       platform:
         type: string
     type: object
+  plugin.RenderConfig:
+    properties:
+      select_theme:
+        type: string
+    type: object
   schema.AcceptAnswerReq:
     properties:
       answer_id:
@@ -1414,8 +1419,12 @@ definitions:
   schema.NotificationClearRequest:
     properties:
       type:
-        description: inbox achievement
+        enum:
+        - inbox
+        - achievement
         type: string
+    required:
+    - type
     type: object
   schema.OnCompleteAction:
     properties:
@@ -5817,6 +5826,26 @@ paths:
       summary: get reasons by object type and action
       tags:
       - reason
+  /answer/api/v1/render/config:
+    get:
+      consumes:
+      - application/json
+      description: GetRenderConfig
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            allOf:
+            - $ref: '#/definitions/handler.RespBody'
+            - properties:
+                data:
+                  $ref: '#/definitions/plugin.RenderConfig'
+              type: object
+      summary: GetRenderConfig
+      tags:
+      - PluginRender
   /answer/api/v1/report:
     post:
       consumes: