aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-05-11 10:07:15 +0200
committerRigel Kent <sendmemail@rigelk.eu>2021-05-11 10:07:43 +0200
commitac2a5b54271e3c3090f863754350907ec916bac2 (patch)
treed3ffedbd0ad60078b37fa8153cb097c5604b0753 /support
parent462212107a04592518193d8e9a7a7c517d982791 (diff)
downloadPeerTube-ac2a5b54271e3c3090f863754350907ec916bac2.tar.gz
PeerTube-ac2a5b54271e3c3090f863754350907ec916bac2.tar.zst
PeerTube-ac2a5b54271e3c3090f863754350907ec916bac2.zip
factorized upload and import post fields in openapi spec
closes #4075
Diffstat (limited to 'support')
-rw-r--r--support/doc/api/openapi.yaml108
1 files changed, 38 insertions, 70 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 0e0d2ab5f..d5b624048 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -1672,74 +1672,7 @@ paths:
1672 content: 1672 content:
1673 multipart/form-data: 1673 multipart/form-data:
1674 schema: 1674 schema:
1675 type: object 1675 $ref: '#/components/schemas/VideoCreateImport'
1676 properties:
1677 torrentfile:
1678 description: Torrent File
1679 type: string
1680 format: binary
1681 targetUrl:
1682 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
1683 magnetUri:
1684 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
1685 channelId:
1686 description: Channel id that will contain this video
1687 allOf:
1688 - $ref: '#/components/schemas/VideoChannel/properties/id'
1689 thumbnailfile:
1690 description: Video thumbnail file
1691 type: string
1692 format: binary
1693 previewfile:
1694 description: Video preview file
1695 type: string
1696 format: binary
1697 privacy:
1698 $ref: '#/components/schemas/VideoPrivacySet'
1699 category:
1700 $ref: '#/components/schemas/VideoCategorySet'
1701 licence:
1702 $ref: '#/components/schemas/VideoLicenceSet'
1703 language:
1704 $ref: '#/components/schemas/VideoLanguageSet'
1705 description:
1706 description: Video description
1707 type: string
1708 waitTranscoding:
1709 description: Whether or not we wait transcoding before publish the video
1710 type: boolean
1711 support:
1712 description: A text tell the audience how to support the video creator
1713 example: Please support my work on <insert crowdfunding plateform>! <3
1714 type: string
1715 nsfw:
1716 description: Whether or not this video contains sensitive content
1717 type: boolean
1718 name:
1719 description: Video name
1720 type: string
1721 minLength: 3
1722 maxLength: 120
1723 tags:
1724 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1725 type: array
1726 minItems: 1
1727 maxItems: 5
1728 items:
1729 type: string
1730 minLength: 2
1731 maxLength: 30
1732 commentsEnabled:
1733 description: Enable or disable comments for this video
1734 type: boolean
1735 downloadEnabled:
1736 description: Enable or disable downloading for this video
1737 type: boolean
1738 scheduleUpdate:
1739 $ref: '#/components/schemas/VideoScheduledUpdate'
1740 required:
1741 - channelId
1742 - name
1743 encoding: 1676 encoding:
1744 torrentfile: 1677 torrentfile:
1745 contentType: application/x-bittorrent 1678 contentType: application/x-bittorrent
@@ -4806,10 +4739,33 @@ components:
4806 label: 4739 label:
4807 type: string 4740 type: string
4808 example: Pending 4741 example: Pending
4742 VideoCreateImport:
4743 allOf:
4744 - type: object
4745 additionalProperties: false
4746 oneOf:
4747 - properties:
4748 targetUrl:
4749 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
4750 required: [targetUrl]
4751 - properties:
4752 magnetUri:
4753 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
4754 required: [magnetUri]
4755 - properties:
4756 torrentfile:
4757 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
4758 required: [torrentfile]
4759 - $ref: '#/components/schemas/VideoUploadRequestCommon'
4760 required:
4761 - channelId
4762 - name
4809 VideoImport: 4763 VideoImport:
4810 properties: 4764 properties:
4811 id: 4765 id:
4812 $ref: '#/components/schemas/id' 4766 readOnly: true
4767 allOf:
4768 - $ref: '#/components/schemas/id'
4813 targetUrl: 4769 targetUrl:
4814 type: string 4770 type: string
4815 format: url 4771 format: url
@@ -4821,19 +4777,31 @@ components:
4821 description: magnet URI allowing to resolve the import's source video 4777 description: magnet URI allowing to resolve the import's source video
4822 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4 4778 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
4823 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i 4779 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
4780 torrentfile:
4781 writeOnly: true
4782 type: string
4783 format: binary
4784 description: Torrent file containing only the video file
4824 torrentName: 4785 torrentName:
4786 readOnly: true
4825 type: string 4787 type: string
4826 state: 4788 state:
4827 $ref: '#/components/schemas/VideoImportStateConstant' 4789 readOnly: true
4790 allOf:
4791 - $ref: '#/components/schemas/VideoImportStateConstant'
4828 error: 4792 error:
4793 readOnly: true
4829 type: string 4794 type: string
4830 createdAt: 4795 createdAt:
4796 readOnly: true
4831 type: string 4797 type: string
4832 format: date-time 4798 format: date-time
4833 updatedAt: 4799 updatedAt:
4800 readOnly: true
4834 type: string 4801 type: string
4835 format: date-time 4802 format: date-time
4836 video: 4803 video:
4804 readOnly: true
4837 nullable: true 4805 nullable: true
4838 allOf: 4806 allOf:
4839 - $ref: '#/components/schemas/Video' 4807 - $ref: '#/components/schemas/Video'