mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +00:00
Introduce a service to restore stored object versions along with relevant tests and an API endpoint. This includes database migrations for version relationships, enhancing stored object version tracking.
155 lines
4.9 KiB
YAML
155 lines
4.9 KiB
YAML
---
|
|
openapi: "3.0.0"
|
|
info:
|
|
version: "1.0.0"
|
|
title: "Chill api"
|
|
description: "Api documentation for chill. Currently, work in progress"
|
|
servers:
|
|
- url: "/api"
|
|
description: "Your current dev server"
|
|
|
|
components:
|
|
schemas:
|
|
StoredObject:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
filename:
|
|
type: string
|
|
type:
|
|
type: string
|
|
|
|
paths:
|
|
/1.0/doc-store/stored-object/create:
|
|
post:
|
|
tags:
|
|
- storedobject
|
|
summary: Create a stored object
|
|
responses:
|
|
200:
|
|
description: "OK"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/StoredObject"
|
|
403:
|
|
description: "Unauthorized"
|
|
422:
|
|
description: "Invalid data"
|
|
|
|
/1.0/doc-store/async-upload/temp_url/{uuid}/generate/post:
|
|
get:
|
|
tags:
|
|
- storedobject
|
|
summary: Get a signed route to post stored object
|
|
parameters:
|
|
- in: path
|
|
name: uuid
|
|
required: true
|
|
allowEmptyValue: false
|
|
description: The UUID of the storedObject
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: "OK"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
403:
|
|
description: "Unauthorized"
|
|
404:
|
|
description: "Not found"
|
|
/1.0/doc-store/async-upload/temp_url/{uuid}/generate/{method}:
|
|
get:
|
|
tags:
|
|
- storedobject
|
|
summary: Get a signed route to get a stored object
|
|
parameters:
|
|
- in: path
|
|
name: uuid
|
|
required: true
|
|
allowEmptyValue: false
|
|
description: The UUID of the storedObjeect
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
- in: path
|
|
name: method
|
|
required: true
|
|
allowEmptyValue: false
|
|
description: the method of the signed url (get or head)
|
|
schema:
|
|
type: string
|
|
enum: [get, head]
|
|
- in: query
|
|
name: version
|
|
required: false
|
|
allowEmptyValue: false
|
|
description: the version's filename of the stored object
|
|
schema:
|
|
type: string
|
|
minLength: 2
|
|
responses:
|
|
200:
|
|
description: "OK"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
403:
|
|
description: "Unauthorized"
|
|
404:
|
|
description: "Not found"
|
|
|
|
/1.0/doc-store/stored-object/{uuid}/versions:
|
|
get:
|
|
tags:
|
|
- storedobject
|
|
summary: Get a signed route to post stored object
|
|
parameters:
|
|
- in: path
|
|
name: uuid
|
|
required: true
|
|
allowEmptyValue: false
|
|
description: The UUID of the storedObjeect
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: "OK"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
403:
|
|
description: "Unauthorized"
|
|
404:
|
|
description: "Not found"
|
|
|
|
/1.0/doc-store/stored-object/restore-from-version/{id}:
|
|
post:
|
|
tags:
|
|
- storedobject
|
|
summary: Restore an old version of a stored object
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
allowEmptyValue: false
|
|
description: The id of the stored object version
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
200:
|
|
description: "OK"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
|