mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
PHRAS-3531_wrong-doc-apiv3
fix documentation for the result of POST:record fix how_to
This commit is contained in:
@@ -13,7 +13,7 @@ to update in swaggerhub (single file) :
|
|||||||
|
|
||||||
- compile sources in a single file for swaggerhub (run from <phraseanet-dir>)
|
- compile sources in a single file for swaggerhub (run from <phraseanet-dir>)
|
||||||
|
|
||||||
`swagger-cli bundle API_documentation/v3/api.yaml -r -o API_documentation/v3/_compiled.yaml -t yaml`
|
`swagger-cli bundle doc/API_documentation/v3/api.yaml -r -o doc/API_documentation/v3/_compiled.yaml -t yaml`
|
||||||
|
|
||||||
|
|
||||||
- copy/paste the generated content from `_compiled.yaml` to
|
- copy/paste the generated content from `_compiled.yaml` to
|
||||||
|
@@ -2239,139 +2239,12 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
example: UTF-8
|
example: UTF-8
|
||||||
response:
|
response:
|
||||||
allOf:
|
type: object
|
||||||
- type: object
|
properties:
|
||||||
properties:
|
url:
|
||||||
databox_id:
|
type: string
|
||||||
type: integer
|
description: Api request to get the created record
|
||||||
example: 2
|
example: /records/29/215/
|
||||||
record_id:
|
|
||||||
type: integer
|
|
||||||
example: 34
|
|
||||||
updated_on:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
created_on:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
collection_id:
|
|
||||||
type: integer
|
|
||||||
example: 5
|
|
||||||
base_id:
|
|
||||||
type: integer
|
|
||||||
example: 14
|
|
||||||
thumbnail:
|
|
||||||
allOf:
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
example: thumbnail
|
|
||||||
mime_type:
|
|
||||||
example: image/jpeg
|
|
||||||
height:
|
|
||||||
example: 160
|
|
||||||
width:
|
|
||||||
example: 240
|
|
||||||
filesize:
|
|
||||||
example: 2375
|
|
||||||
url:
|
|
||||||
example: 'http://phraseanet.demo.fr/medias/eyJ0eXAiOiJKV1Q...'
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
permalink:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
created_on:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
is_activated:
|
|
||||||
type: boolean
|
|
||||||
label:
|
|
||||||
type: string
|
|
||||||
updated_on:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
page_url:
|
|
||||||
type: string
|
|
||||||
download_url:
|
|
||||||
type: string
|
|
||||||
url:
|
|
||||||
type: string
|
|
||||||
height:
|
|
||||||
type: integer
|
|
||||||
width:
|
|
||||||
type: integer
|
|
||||||
filesize:
|
|
||||||
type: integer
|
|
||||||
devices:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- screen
|
|
||||||
- printer ?
|
|
||||||
player_type:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- IMAGE
|
|
||||||
mime_type:
|
|
||||||
type: string
|
|
||||||
substituted:
|
|
||||||
type: boolean
|
|
||||||
example: false
|
|
||||||
created_on:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
updated_on:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
url:
|
|
||||||
type: string
|
|
||||||
url_ttl:
|
|
||||||
type: integer
|
|
||||||
example: 7200
|
|
||||||
uuid:
|
|
||||||
type: string
|
|
||||||
example: 5b079f33-0851-4aec-a978-b7f8d7204e5a
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
mime_type:
|
|
||||||
type: string
|
|
||||||
example: image/jpeg
|
|
||||||
title:
|
|
||||||
type: string
|
|
||||||
example: Sleepy cat
|
|
||||||
original_name:
|
|
||||||
type: string
|
|
||||||
example: DSC_12345.jpg
|
|
||||||
technical_informations:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
example:
|
|
||||||
Aperture: 6.3
|
|
||||||
CameraModel: Canon EOS 5D Mark II
|
|
||||||
Channels: 3
|
|
||||||
ColorSpace: RGB
|
|
||||||
FileSize: 5618218
|
|
||||||
sha256:
|
|
||||||
type: string
|
|
||||||
example: 6f330ac0ae2...
|
|
||||||
phrasea_type:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- image
|
|
||||||
- video
|
|
||||||
example: image
|
|
||||||
is_story:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
default:
|
default:
|
||||||
description: Any other error
|
description: Any other error
|
||||||
'/stories/{sbas_id}/{record_id}':
|
'/stories/{sbas_id}/{record_id}':
|
||||||
|
@@ -693,7 +693,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: record.yaml#/ApiResponse_record
|
$ref: record.yaml#/ApiResponse_record_reference
|
||||||
default:
|
default:
|
||||||
$ref: 'common.yaml#/error_response'
|
$ref: 'common.yaml#/error_response'
|
||||||
# security:
|
# security:
|
||||||
|
@@ -114,11 +114,21 @@
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
Record_reference:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
description: Api request to get the created record
|
||||||
|
example:
|
||||||
|
'/records/29/215/'
|
||||||
|
|
||||||
Record_extended:
|
Record_extended:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/Record'
|
- $ref: '#/Record'
|
||||||
- $ref: '#/_record_extension_'
|
- $ref: '#/_record_extension_'
|
||||||
|
|
||||||
|
|
||||||
Story:
|
Story:
|
||||||
allOf: # Combines the basic _Record_ and the stories-only properties
|
allOf: # Combines the basic _Record_ and the stories-only properties
|
||||||
- $ref: '#/_Record_'
|
- $ref: '#/_Record_'
|
||||||
@@ -253,6 +263,14 @@
|
|||||||
response:
|
response:
|
||||||
$ref: '#/Record_extended'
|
$ref: '#/Record_extended'
|
||||||
|
|
||||||
|
ApiResponse_record_reference:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
meta:
|
||||||
|
$ref: 'common.yaml#/ApiResponse_meta'
|
||||||
|
response:
|
||||||
|
$ref: '#/Record_reference'
|
||||||
|
|
||||||
ApiResponse_story:
|
ApiResponse_story:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
Reference in New Issue
Block a user