mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-08 02:24:26 +00:00
PHRAS-3607 : apiv3 doc : add bases[]
fix mismatch record_id / story_id
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -110,6 +110,21 @@ components:
|
|||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 100
|
maximum: 100
|
||||||
# default:
|
# default:
|
||||||
|
|
||||||
|
bases:
|
||||||
|
name: bases
|
||||||
|
in: query
|
||||||
|
description: >
|
||||||
|
'bases_id s to search on as seen in `Collection id ("base_id" API side)` in _admin > Databases > ... collection_
|
||||||
|
|
||||||
|
If not set: search all collections'
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
uniqueItems: false
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
|
||||||
# securitySchemes:
|
# securitySchemes:
|
||||||
# api_key:
|
# api_key:
|
||||||
# type: apiKey
|
# type: apiKey
|
||||||
@@ -123,14 +138,14 @@ components:
|
|||||||
# tokenUrl: azea
|
# tokenUrl: azea
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
'/me':
|
# '/me':
|
||||||
get:
|
# get:
|
||||||
description: 'todo'
|
# description: 'todo'
|
||||||
responses:
|
# responses:
|
||||||
200:
|
# 200:
|
||||||
description: successful operation
|
# description: successful operation
|
||||||
default:
|
# default:
|
||||||
description: Any error
|
# description: Any error
|
||||||
|
|
||||||
# ---------------- search ----------------
|
# ---------------- search ----------------
|
||||||
'/search':
|
'/search':
|
||||||
@@ -464,6 +479,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/query'
|
- $ref: '#/components/parameters/query'
|
||||||
- $ref: '#/components/parameters/search_type'
|
- $ref: '#/components/parameters/search_type'
|
||||||
|
- $ref: '#/components/parameters/bases'
|
||||||
- $ref: '#/components/parameters/page'
|
- $ref: '#/components/parameters/page'
|
||||||
- $ref: '#/components/parameters/per_page'
|
- $ref: '#/components/parameters/per_page'
|
||||||
- $ref: '#/components/parameters/offset'
|
- $ref: '#/components/parameters/offset'
|
||||||
@@ -488,7 +504,21 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- facets
|
- facets
|
||||||
|
- suggestions
|
||||||
- result.stories.children
|
- result.stories.children
|
||||||
|
- results.records.subdefs
|
||||||
|
- results.stories.subdefs
|
||||||
|
- results.records.caption
|
||||||
|
- results.stories.caption
|
||||||
|
- results.records.metadata
|
||||||
|
- results.stories.metadata
|
||||||
|
- results.records.status
|
||||||
|
- results.stories.status
|
||||||
|
- results.records.children
|
||||||
|
- results.records.children.subdefs
|
||||||
|
- results.records.children.caption
|
||||||
|
- results.records.children.metadata
|
||||||
|
- results.records.children.status
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: ok
|
description: ok
|
||||||
@@ -513,6 +543,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/query'
|
- $ref: '#/components/parameters/query'
|
||||||
- $ref: '#/components/parameters/search_type'
|
- $ref: '#/components/parameters/search_type'
|
||||||
|
- $ref: '#/components/parameters/bases'
|
||||||
- $ref: '#/components/parameters/page'
|
- $ref: '#/components/parameters/page'
|
||||||
- $ref: '#/components/parameters/per_page'
|
- $ref: '#/components/parameters/per_page'
|
||||||
- $ref: '#/components/parameters/offset'
|
- $ref: '#/components/parameters/offset'
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
type: integer
|
type: integer
|
||||||
example:
|
example:
|
||||||
2
|
2
|
||||||
record_id:
|
|
||||||
type: integer
|
|
||||||
example:
|
|
||||||
34
|
|
||||||
updated_on:
|
updated_on:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
@@ -80,13 +76,19 @@
|
|||||||
|
|
||||||
Record:
|
Record:
|
||||||
allOf: # Combines the basic _Record_ and the records-only properties
|
allOf: # Combines the basic _Record_ and the records-only properties
|
||||||
- $ref: '#/_Record_'
|
|
||||||
- type: object
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
record_id:
|
record_id:
|
||||||
type: integer
|
type: integer
|
||||||
example:
|
example:
|
||||||
34
|
34
|
||||||
|
- $ref: '#/_Record_'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
# record_id:
|
||||||
|
# type: integer
|
||||||
|
# example:
|
||||||
|
# 34
|
||||||
mime_type:
|
mime_type:
|
||||||
type: string
|
type: string
|
||||||
example:
|
example:
|
||||||
@@ -133,15 +135,15 @@
|
|||||||
- $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_'
|
||||||
- type: object
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
story_id:
|
# story_id:
|
||||||
type: integer
|
# type: integer
|
||||||
example:
|
# example:
|
||||||
1400
|
# 1400
|
||||||
cover_record_id:
|
cover_record_id:
|
||||||
$ref: 'common.yaml#/ID'
|
$ref: 'common.yaml#/ID'
|
||||||
description: 'id of the record chosen as "cover" (or null)'
|
description: 'id of the record chosen as "cover" (or null)'
|
||||||
@@ -182,13 +184,37 @@
|
|||||||
items:
|
items:
|
||||||
$ref: '#/Record'
|
$ref: '#/Record'
|
||||||
|
|
||||||
|
StoryWithStoryId:
|
||||||
|
allOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
story_id:
|
||||||
|
type: integer
|
||||||
|
example:
|
||||||
|
1400
|
||||||
|
- $ref: '#/_Story_'
|
||||||
|
|
||||||
|
StoryWithRecordId:
|
||||||
|
allOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
record_id:
|
||||||
|
type: integer
|
||||||
|
example:
|
||||||
|
1400
|
||||||
|
- $ref: '#/_Story_'
|
||||||
|
|
||||||
Story_extended:
|
Story_extended:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/Story'
|
- type: object
|
||||||
|
properties:
|
||||||
|
record_id: # on route /stories, the story has a record_id !!!
|
||||||
|
type: integer
|
||||||
|
example:
|
||||||
|
1400
|
||||||
|
- $ref: '#/StoryWithRecordId'
|
||||||
- $ref: '#/_record_extension_'
|
- $ref: '#/_record_extension_'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TechnicalInformation:
|
TechnicalInformation:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
@@ -289,7 +315,14 @@
|
|||||||
meta:
|
meta:
|
||||||
$ref: 'common.yaml#/ApiResponse_meta'
|
$ref: 'common.yaml#/ApiResponse_meta'
|
||||||
response:
|
response:
|
||||||
$ref: '#/Story'
|
allOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
record_id: # on route /stories, the story has a record_id !!!
|
||||||
|
type: integer
|
||||||
|
example:
|
||||||
|
1400
|
||||||
|
- $ref: '#/StoryWithRecordId'
|
||||||
|
|
||||||
ApiResponse_story_extended:
|
ApiResponse_story_extended:
|
||||||
type: object
|
type: object
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
stories:
|
stories:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: 'record.yaml#/Story'
|
$ref: 'record.yaml#/StoryWithStoryId'
|
||||||
records:
|
records:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
Reference in New Issue
Block a user