visuddhinanda 2 years ago
parent
commit
b2d839a2d0

+ 9 - 0
openapi/public/assets/protocol/resources/channel/channel.yaml

@@ -0,0 +1,9 @@
+properties:
+  uid:
+    type: string
+  name:
+    type: string
+  summary:
+    type: string
+  owner_uid:
+    type: string

+ 27 - 0
openapi/public/assets/protocol/resources/channel/show.yaml

@@ -0,0 +1,27 @@
+get:
+  summary: Display the specified resource.
+  tags:
+    - channel
+  description: 返回某个channel的信息
+  parameters:
+    - name: channelId
+      in: path
+      required: true
+      description: channel uuid
+      schema:
+        type: string
+  responses:
+    "200": # status code
+      description: A JSON array of channel information
+      content:
+        application/json:
+          schema:
+            type: object
+            properties:
+              ok:
+                type: boolean
+              message:
+                type: string
+              data:
+                type: object
+                $ref: "./channel.yaml"

+ 33 - 0
openapi/public/assets/protocol/resources/channel/store.yaml

@@ -0,0 +1,33 @@
+post:
+  summary: Store a newly created resource in storage.
+  tags:
+    - channel
+  requestBody:
+    description: 新建
+    required: true
+    content:
+      application/json:
+        schema:
+          type: object
+          properties:
+            - name:
+              type: string
+              required: true
+            - studio:
+              type: string
+              summary: studio name(owner name)
+  responses:
+    "200": # status code
+      description: A JSON array of channel information
+      content:
+        application/json:
+          schema:
+            type: object
+            properties:
+              ok:
+                type: boolean
+              message:
+                type: string
+              data:
+                type: object
+                $ref: "./channel.yaml"

+ 28 - 0
openapi/public/assets/protocol/resources/list_query.yaml

@@ -0,0 +1,28 @@
+- name: search
+  in: query
+  description: 搜索关键字
+  schema:
+    type: string
+- name: order
+  in: query
+  description: 排序字段
+  schema:
+    type: string
+- name: dir
+  in: query
+  description: 排序方向
+  schema:
+    type: string
+    enum:
+      - desc
+      - asc
+- name: limit
+  in: query
+  description: 每页记录数
+  schema:
+    type: number
+- name: offset
+  in: query
+  description: 从第几条记录开始提取
+  schema:
+    type: number