From b1390f4e9b1e6541c37c426d410265cf241e003a Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 24 Feb 2022 11:20:11 +0100 Subject: [PATCH] docstore: add swagger documentation --- .../ChillDocStoreBundle/chill.api.specs.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml diff --git a/src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml b/src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml new file mode 100644 index 000000000..d74311387 --- /dev/null +++ b/src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml @@ -0,0 +1,46 @@ +--- +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/docstore/stored-object.json: + post: + tags: + - storedobject + summary: Create a stored object + requestBody: + description: "A stored object" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/StoredObject" + responses: + 200: + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/StoredObject" + 403: + description: "Unauthorized" + 422: + description: "Invalid data"