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>)
|
||||
|
||||
`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
|
||||
|
@@ -2239,139 +2239,12 @@ paths:
|
||||
type: string
|
||||
example: UTF-8
|
||||
response:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
databox_id:
|
||||
type: integer
|
||||
example: 2
|
||||
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
|
||||
description: Api request to get the created record
|
||||
example: /records/29/215/
|
||||
default:
|
||||
description: Any other error
|
||||
'/stories/{sbas_id}/{record_id}':
|
||||
|
@@ -693,7 +693,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: record.yaml#/ApiResponse_record
|
||||
$ref: record.yaml#/ApiResponse_record_reference
|
||||
default:
|
||||
$ref: 'common.yaml#/error_response'
|
||||
# security:
|
||||
|
@@ -114,11 +114,21 @@
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
Record_reference:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: Api request to get the created record
|
||||
example:
|
||||
'/records/29/215/'
|
||||
|
||||
Record_extended:
|
||||
allOf:
|
||||
- $ref: '#/Record'
|
||||
- $ref: '#/_record_extension_'
|
||||
|
||||
|
||||
Story:
|
||||
allOf: # Combines the basic _Record_ and the stories-only properties
|
||||
- $ref: '#/_Record_'
|
||||
@@ -253,6 +263,14 @@
|
||||
response:
|
||||
$ref: '#/Record_extended'
|
||||
|
||||
ApiResponse_record_reference:
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
$ref: 'common.yaml#/ApiResponse_meta'
|
||||
response:
|
||||
$ref: '#/Record_reference'
|
||||
|
||||
ApiResponse_story:
|
||||
type: object
|
||||
properties:
|
||||
|
Reference in New Issue
Block a user