From 282f138fa1f88a9dae80977ff28ce593e050535b Mon Sep 17 00:00:00 2001
From: Valentin Rigal <rigal@teklia.com>
Date: Tue, 25 Jun 2019 10:26:24 +0000
Subject: [PATCH] ListElementEntities documentation

---
 arkindex/schema.yml | 154 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 154 insertions(+)

diff --git a/arkindex/schema.yml b/arkindex/schema.yml
index bb0a859..e3f360e 100644
--- a/arkindex/schema.yml
+++ b/arkindex/schema.yml
@@ -1187,6 +1187,160 @@ paths:
                 - name
       tags:
       - elements
+  /api/v1/element/{id}/entities/:
+    get:
+      description: List all entities linked to an element's transcriptions and metadata
+      operationId: ListElementsEntities
+      parameters:
+      - description: ''
+        in: path
+        name: id
+        required: true
+        schema:
+          type: string
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                properties:
+                  id:
+                    type: string
+                  metadata:
+                    items:
+                      properties:
+                        dates:
+                          items:
+                            properties:
+                              day:
+                                nullable: true
+                                type: integer
+                              month:
+                                nullable: true
+                                type: integer
+                              type:
+                                enum:
+                                - exact
+                                - lower
+                                - upper
+                                - unknown
+                              year:
+                                type: integer
+                            required:
+                            - year
+                            - type
+                          type: array
+                        entity:
+                          properties:
+                            id:
+                              type: string
+                            name:
+                              type: string
+                            type:
+                              enum:
+                              - person
+                              - location
+                              - subject
+                              - organization
+                              - misc
+                          required:
+                          - name
+                          - type
+                          type: object
+                        id:
+                          type: string
+                        name:
+                          type: string
+                        revision:
+                          properties:
+                            author:
+                              type: string
+                            commit_url:
+                              readOnly: true
+                              type: string
+                            date:
+                              format: date-time
+                              type: string
+                            hash:
+                              type: string
+                            id:
+                              type: string
+                            message:
+                              type: string
+                            ref:
+                              type: string
+                            repo_id:
+                              readOnly: true
+                              type: string
+                          required:
+                          - date
+                          - hash
+                          - ref
+                          - message
+                          - author
+                          type: object
+                        type:
+                          enum:
+                          - text
+                          - html
+                          - date
+                          - location
+                          - entity
+                        value:
+                          type: string
+                      required:
+                      - type
+                      - name
+                      - value
+                      - revision
+                      - dates
+                      - entity
+                    type: array
+                  name:
+                    type: string
+                  transcriptions:
+                    items:
+                      properties:
+                        entity:
+                          properties:
+                            id:
+                              type: string
+                            name:
+                              type: string
+                            type:
+                              enum:
+                              - person
+                              - location
+                              - subject
+                              - organization
+                              - misc
+                          required:
+                          - name
+                          - type
+                          type: object
+                        length:
+                          type: integer
+                        offset:
+                          type: integer
+                      required:
+                      - entity
+                      - offset
+                      - length
+                    type: array
+                  type:
+                    enum:
+                    - volume
+                    - register
+                    - act
+                    - page
+                    - surface
+                required:
+                - type
+                - name
+                - transcriptions
+                - metadata
+      tags:
+      - entities
   /api/v1/element/{id}/history/:
     get:
       description: List an element's update history
-- 
GitLab