From db77224b9f2724ebea5fc2eadadd3188447a61a8 Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 8 Jun 2021 20:36:20 +0200 Subject: [PATCH] address: add swagger documentation --- .../ChillMainBundle/chill.api.specs.yaml | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/chill.api.specs.yaml b/src/Bundle/ChillMainBundle/chill.api.specs.yaml index 6a43686b0..98ec9c4ed 100644 --- a/src/Bundle/ChillMainBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillMainBundle/chill.api.specs.yaml @@ -142,7 +142,6 @@ paths: responses: 200: description: "OK" - /1.0/main/address.json: get: tags: @@ -151,6 +150,57 @@ paths: responses: 200: description: "ok" + post: + tags: + - address + summary: create a new address + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + buildingName: + type: string + corridor: + type: string + distribution: + type: string + extra: + type: string + flat: + type: string + floor: + type: string + isNoAddress: + type: boolean + point: + type: array + items: + type: number + minItems: 2 + maxItems: 2 + postcode: + $ref: '#/components/schemas/PostalCode' + steps: + type: string + street: + type: string + streetNumber: + type: string + responses: + 401: + description: "Unauthorized" + 404: + description: "Not found" + 200: + description: "OK" + 422: + description: "Unprocessable entity (validation errors)" + 400: + description: "transition cannot be applyed" + /1.0/main/address/{id}.json: get: tags: