visuddhinanda hace 2 años
padre
commit
e5ca86d33f

+ 25 - 0
openapi/public/assets/protocol/resources/sentence/data.yaml

@@ -0,0 +1,25 @@
+properties:
+  uid:
+    type: string
+  book_id:
+    type: string
+  paragraph:
+    type: string
+  word_start:
+    type: string
+  word_end:
+    type: string
+  content:
+    type: string
+  content_type:
+    type: string
+  channel_uid:
+    type: string
+  editor_uid:
+    type: string
+  language:
+    type: string
+  updated_at:
+    type: string
+  created_at:
+    type: string

+ 66 - 0
openapi/public/assets/protocol/resources/sentence/index.yaml

@@ -0,0 +1,66 @@
+get:
+  summary: 句子信息列表
+  tags:
+    - sentence
+  description: 返回多行数据。支持分页。
+  parameters:
+    - name: view
+      in: query
+      required: true
+      description: 查询的内容
+      schema:
+        type: string
+        enum:
+          - chapter
+    - name: book
+      in: query
+      required: true
+      description: 书号
+      schema:
+        type: number
+        minimum: 1
+        maximum: 217
+    - name: para
+      in: query
+      required: true
+      description: 段落号
+      schema:
+        type: number
+    - name: html
+      in: query
+      description: 是否由服务器渲染content 默认false
+      schema:
+        type: boolean
+    - name: limit
+      in: query
+      description: 每次提取记录数
+      schema:
+        type: number
+        minimum: 1
+        maximum: 1000
+    - name: offset
+      in: query
+      description: 从第几条记录开始提取
+      schema:
+        type: number
+  responses:
+    "200": # status code
+      description: A JSON array of user names
+      content:
+        application/json:
+          schema:
+            type: object
+            properties:
+              ok:
+                type: boolean
+              message:
+                type: string
+              data:
+                type: object
+                properties:
+                  rows:
+                    type: object
+                    $ref: "./data.yaml"
+                  count:
+                    type: number
+                    description: 符合要求的记录总数