diff --git a/Express/barAndCafe/src/app.ts b/Express/barAndCafe/src/app.ts index 6eb0f0d..400e92f 100644 --- a/Express/barAndCafe/src/app.ts +++ b/Express/barAndCafe/src/app.ts @@ -1,4 +1,4 @@ -import { getCity, getRadius, getPoiId } from "./openTripMaps" +import { getCity, getRadius, getPoiId, getBox } from "./openTripMaps" import express from "express" /** * Initialize Express application instance. @@ -107,7 +107,7 @@ app.get("/otm/radius", getRadius) * type: string * responses: * 200: - * description: Return a list of bars and coffee in city in geoJSON format + * description: Return the detaill of an POI in otm * 400: * description: Missing Argument Error * 401: @@ -115,4 +115,53 @@ app.get("/otm/radius", getRadius) */ app.get("/otm/poidetaill", getPoiId) +/** + * @openapi + * /otm/box: + * get: + * summary: return the drinks in a box + * description: return the drinks in a defined box + * parameters: + * - name: lon1 + * in: query + * required: true + * description: longitude 1 of the box + * schema: + * type: number + * minimum: -180 + * maximum: 180 + * - name: lat1 + * in: query + * required: true + * description: latitude 1 of the box + * schema: + * type: number + * minimum: -90 + * maximum: 90 + * - name: lon2 + * in: query + * required: true + * description: longitude 2 of the box + * schema: + * type: number + * minimum: -180 + * maximum: 180 + * - name: lat2 + * in: query + * required: true + * description: latitude 2 of the box + * schema: + * type: number + * minimum: -90 + * maximum: 90 + * responses: + * 200: + * description: Return a list of bars and coffee in city in geoJSON format + * 400: + * description: Missing Argument Error + * 401: + * description: Missing OTM tocken + */ +app.get("/otm/box", getBox) + export default app \ No newline at end of file