From d0856a9a39c7a90b28b079bc690b8b15a2798a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 23 Nov 2021 22:23:54 +0100 Subject: [PATCH] reformat to 4 spaces --- .../ChillMainBundle/chill.api.specs.yaml | 1209 +++++++++-------- 1 file changed, 605 insertions(+), 604 deletions(-) diff --git a/src/Bundle/ChillMainBundle/chill.api.specs.yaml b/src/Bundle/ChillMainBundle/chill.api.specs.yaml index 8252502ba..110547201 100644 --- a/src/Bundle/ChillMainBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillMainBundle/chill.api.specs.yaml @@ -1,625 +1,626 @@ --- openapi: "3.0.0" info: - version: "1.0.0" - title: "Chill api" - description: "Api documentation for chill. Currently, work in progress" + version: "1.0.0" + title: "Chill api" + description: "Api documentation for chill. Currently, work in progress" servers: - - url: "/api" - description: "Your current dev server" + - url: "/api" + description: "Your current dev server" components: - schemas: - User: - type: object - properties: - id: - type: integer - type: - type: string - enum: - - user - username: - type: string - text: - type: string - Center: - type: object - properties: - id: - type: integer - name: - type: string - Address: - type: object - properties: - address_id: - type: integer - text: - type: string - postcode: - type: object - properties: - name: - type: string - - Country: - type: object - properties: - id: - type: integer - name: - type: object - countryCode: - type: string - - PostalCode: - type: object - properties: - id: - type: integer - name: - type: string - code: - type: string - country: - type: object - properties: - id: - type: integer - name: - type: object - countryCode: - type: string - - AddressReference: - type: object - properties: - id: - type: integer - refId: - type: string - street: - type: string - streetNumber: - type: string - postcode: - type: object - properties: - id: - type: integer - name: - type: string - code: - type: string - country: - type: object - properties: + schemas: + User: + type: object + properties: id: - type: integer + type: integer + type: + type: string + enum: + - user + username: + type: string + text: + type: string + Center: + type: object + properties: + id: + type: integer name: - type: object + type: string + Address: + type: object + properties: + address_id: + type: integer + text: + type: string + postcode: + type: object + properties: + name: + type: string + + Country: + type: object + properties: + id: + type: integer + name: + type: object countryCode: - type: string - municipalityCode: - type: string - source: - type: string - point: - type: object - properties: - type: - type: string - coordinates: - type: array - items: - type: number - minItems: 2 - maxItems: 2 + type: string + + PostalCode: + type: object + properties: + id: + type: integer + name: + type: string + code: + type: string + country: + type: object + properties: + id: + type: integer + name: + type: object + countryCode: + type: string + + AddressReference: + type: object + properties: + id: + type: integer + refId: + type: string + street: + type: string + streetNumber: + type: string + postcode: + type: object + properties: + id: + type: integer + name: + type: string + code: + type: string + country: + type: object + properties: + id: + type: integer + name: + type: object + countryCode: + type: string + municipalityCode: + type: string + source: + type: string + point: + type: object + properties: + type: + type: string + coordinates: + type: array + items: + type: number + minItems: 2 + maxItems: 2 paths: - /1.0/search.json: - get: - summary: perform a search across multiple entities - tags: - - search - - person - - thirdparty - description: > - The search is performed across multiple entities. The entities must be listed into - `type` parameters. - - The results are ordered by relevance, from the most to the lowest relevant. - - parameters: - - name: q - in: query - required: true - description: the pattern to search - schema: - type: string - - name: type[] - in: query - required: true - description: the type entities amongst the search is performed - schema: - type: array - items: - type: string - enum: + /1.0/search.json: + get: + summary: perform a search across multiple entities + tags: + - search - person - thirdparty + description: > + The search is performed across multiple entities. The entities must be listed into + `type` parameters. + + The results are ordered by relevance, from the most to the lowest relevant. + + parameters: + - name: q + in: query + required: true + description: the pattern to search + schema: + type: string + - name: type[] + in: query + required: true + description: the type entities amongst the search is performed + schema: + type: array + items: + type: string + enum: + - person + - thirdparty + - user + responses: + 200: + description: "OK" + /1.0/main/address.json: + get: + tags: + - address + summary: Return a list of all Chill addresses + 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" + patch: + tags: + - address + summary: patch an 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 + validFrom: + type: string + validTo: + 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: + - address + summary: Return an address by id + parameters: + - name: id + in: path + required: true + description: The address id + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: "ok" + content: + application/json: + schema: + $ref: '#/components/schemas/Address' + 404: + description: "not found" + 401: + description: "Unauthorized" + + /1.0/main/address/{id}/duplicate.json: + post: + tags: + - address + summary: Duplicate an existing address + parameters: + - name: id + in: path + required: true + description: The address id that will be duplicated + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: "ok" + content: + application/json: + schema: + $ref: '#/components/schemas/Address' + 404: + description: "not found" + 401: + description: "Unauthorized" + + /1.0/main/address-reference.json: + get: + tags: + - address + summary: Return a list of all reference addresses + parameters: + - in: query + name: postal_code + required: false + schema: + type: integer + description: The id of a postal code to filter the reference addresses + responses: + 200: + description: "ok" + /1.0/main/address-reference/{id}.json: + get: + tags: + - address + summary: Return a reference address by id + parameters: + - name: id + in: path + required: true + description: The reference address id + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: "ok" + content: + application/json: + schema: + $ref: '#/components/schemas/AddressReference' + 404: + description: "not found" + 401: + description: "Unauthorized" + + /1.0/main/postal-code.json: + get: + tags: + - address + summary: Return a list of all postal-code + parameters: + - in: query + name: country + required: false + schema: + type: integer + description: The id of a country to filter the postal code + responses: + 200: + description: "ok" + post: + tags: + - address + summary: create a new PostalCode + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + code: + type: string + country: + $ref: '#/components/schemas/Country' + 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/postal-code/{id}.json: + get: + tags: + - address + summary: Return a postal code by id + parameters: + - name: id + in: path + required: true + description: The postal code id + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: "ok" + content: + application/json: + schema: + $ref: '#/components/schemas/PostalCode' + 404: + description: "not found" + 401: + description: "Unauthorized" + + /1.0/main/country.json: + get: + tags: + - address + summary: Return a list of all countries + responses: + 200: + description: "ok" + /1.0/main/country/{id}.json: + get: + tags: + - address + summary: Return a country by id + parameters: + - name: id + in: path + required: true + description: The country id + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: "ok" + content: + application/json: + schema: + $ref: '#/components/schemas/Country' + 404: + description: "not found" + 401: + description: "Unauthorized" + + + /1.0/main/user.json: + get: + tags: - user - responses: - 200: - description: "OK" - /1.0/main/address.json: - get: - tags: - - address - summary: Return a list of all Chill addresses - 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" - patch: - tags: - - address - summary: patch an 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 - validFrom: - type: string - validTo: - 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" + summary: Return a list of all user + responses: + 200: + description: "ok" + /1.0/main/whoami.json: + get: + tags: + - user + summary: Return the currently authenticated user + responses: + 200: + description: "ok" + /1.0/main/user/{id}.json: + get: + tags: + - user + summary: Return a user by id + parameters: + - name: id + in: path + required: true + description: The user id + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: "ok" + content: + application/json: + schema: + $ref: '#/components/schemas/User' + 404: + description: "not found" + 401: + description: "Unauthorized" - /1.0/main/address/{id}.json: - get: - tags: - - address - summary: Return an address by id - parameters: - - name: id - in: path - required: true - description: The address id - schema: - type: integer - format: integer - minimum: 1 - responses: - 200: - description: "ok" - content: - application/json: - schema: - $ref: '#/components/schemas/Address' - 404: - description: "not found" - 401: - description: "Unauthorized" + /1.0/main/scope.json: + get: + tags: + - scope + summary: return a list of scopes + responses: + 200: + description: "ok" + 401: + description: "Unauthorized" - /1.0/main/address/{id}/duplicate.json: - post: - tags: - - address - summary: Duplicate an existing address - parameters: - - name: id - in: path - required: true - description: The address id that will be duplicated - schema: - type: integer - format: integer - minimum: 1 - responses: - 200: - description: "ok" - content: - application/json: - schema: - $ref: '#/components/schemas/Address' - 404: - description: "not found" - 401: - description: "Unauthorized" + /1.0/main/scope/{id}.json: + get: + tags: + - scope + summary: return a list of scopes + parameters: + - name: id + in: path + required: true + description: The scope id + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: "ok" + 401: + description: "Unauthorized" - /1.0/main/address-reference.json: - get: - tags: - - address - summary: Return a list of all reference addresses - parameters: - - in: query - name: postal_code - required: false - schema: - type: integer - description: The id of a postal code to filter the reference addresses - responses: - 200: - description: "ok" - /1.0/main/address-reference/{id}.json: - get: - tags: - - address - summary: Return a reference address by id - parameters: - - name: id - in: path - required: true - description: The reference address id - schema: - type: integer - format: integer - minimum: 1 - responses: - 200: - description: "ok" - content: - application/json: - schema: - $ref: '#/components/schemas/AddressReference' - 404: - description: "not found" - 401: - description: "Unauthorized" + /1.0/main/location.json: + get: + tags: + - location + summary: Return a list of locations + responses: + 200: + description: "ok" + 401: + description: "Unauthorized" + post: + tags: + - location + summary: create a new location + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + type: + type: string + name: + type: string + phonenumber1: + type: string + phonenumber2: + type: string + email: + type: string + address: + type: object + properties: + id: + type: integer + locationType: + type: object + properties: + id: + type: integer + type: + 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/postal-code.json: - get: - tags: - - address - summary: Return a list of all postal-code - parameters: - - in: query - name: country - required: false - schema: - type: integer - description: The id of a country to filter the postal code - responses: - 200: - description: "ok" - post: - tags: - - address - summary: create a new PostalCode - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - code: - type: string - country: - $ref: '#/components/schemas/Country' - 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/location/{id}.json: + get: + tags: + - location + summary: Return the given location + parameters: + - name: id + in: path + required: true + description: The location id + schema: + type: integer + format: integer + minimum: 1 + responses: + 200: + description: "ok" + 401: + description: "Unauthorized" - /1.0/main/postal-code/{id}.json: - get: - tags: - - address - summary: Return a postal code by id - parameters: - - name: id - in: path - required: true - description: The postal code id - schema: - type: integer - format: integer - minimum: 1 - responses: - 200: - description: "ok" - content: - application/json: - schema: - $ref: '#/components/schemas/PostalCode' - 404: - description: "not found" - 401: - description: "Unauthorized" + /1.0/main/location-type.json: + get: + tags: + - location + summary: Return a list of location types + responses: + 200: + description: "ok" + 401: + description: "Unauthorized" - /1.0/main/country.json: - get: - tags: - - address - summary: Return a list of all countries - responses: - 200: - description: "ok" - /1.0/main/country/{id}.json: - get: - tags: - - address - summary: Return a country by id - parameters: - - name: id - in: path - required: true - description: The country id - schema: - type: integer - format: integer - minimum: 1 - responses: - 200: - description: "ok" - content: - application/json: - schema: - $ref: '#/components/schemas/Country' - 404: - description: "not found" - 401: - description: "Unauthorized" - - - /1.0/main/user.json: - get: - tags: - - user - summary: Return a list of all user - responses: - 200: - description: "ok" - /1.0/main/whoami.json: - get: - tags: - - user - summary: Return the currently authenticated user - responses: - 200: - description: "ok" - /1.0/main/user/{id}.json: - get: - tags: - - user - summary: Return a user by id - parameters: - - name: id - in: path - required: true - description: The user id - schema: - type: integer - format: integer - minimum: 1 - responses: - 200: - description: "ok" - content: - application/json: - schema: - $ref: '#/components/schemas/User' - 404: - description: "not found" - 401: - description: "Unauthorized" - - /1.0/main/scope.json: - get: - tags: - - scope - summary: return a list of scopes - responses: - 200: - description: "ok" - 401: - description: "Unauthorized" - - /1.0/main/scope/{id}.json: - get: - tags: - - scope - summary: return a list of scopes - parameters: - - name: id - in: path - required: true - description: The scope id - schema: - type: integer - format: integer - minimum: 1 - responses: - 200: - description: "ok" - 401: - description: "Unauthorized" - - /1.0/main/location.json: - get: - tags: - - location - summary: Return a list of locations - responses: - 200: - description: "ok" - 401: - description: "Unauthorized" - post: - tags: - - location - summary: create a new location - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - type: - type: string - name: - type: string - phonenumber1: - type: string - phonenumber2: - type: string - email: - type: string - address: - type: object - properties: - id: - type: integer - locationType: - type: object - properties: - id: - type: integer - type: - 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/location/{id}.json: - get: - tags: - - location - summary: Return the given location - parameters: - - name: id - in: path - required: true - description: The location id - schema: - type: integer - format: integer - minimum: 1 - responses: - 200: - description: "ok" - 401: - description: "Unauthorized" - - /1.0/main/location-type.json: - get: - tags: - - location - summary: Return a list of location types - responses: - 200: - description: "ok" - 401: - description: "Unauthorized"