v2-relation-import.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-relation-import.yaml
  2. get:
  3. summary: 'Import relations from an uploaded XLSX file.'
  4. tags:
  5. - relation-import
  6. operationId: get_api_v2_relation_import
  7. description: |-
  8. Requires authentication. Reads the file path from the `filename` request
  9. parameter. Existing records are matched by id and updated in place;
  10. rows without a matching id are inserted as new records.
  11. Invalidates the vocabulary cache on completion.
  12. 实现:`RelationController@import`
  13. parameters:
  14. -
  15. name: filename
  16. in: query
  17. schema:
  18. type: string
  19. responses:
  20. 200:
  21. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  22. content:
  23. application/json:
  24. schema:
  25. type: object
  26. properties:
  27. ok:
  28. type: boolean
  29. message:
  30. type: string
  31. data:
  32. type: object
  33. 401:
  34. $ref: '../../main.yaml#/components/responses/Unauthorized'
  35. 422:
  36. $ref: '../../main.yaml#/components/responses/ValidationError'