From ae9e1eae47245aeaeb76b328fb227b082a75c8ee Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 18 May 2024 13:04:59 +0200 Subject: [PATCH] add route and swagger doc --- Express/barAndCafe/src/app.ts | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Express/barAndCafe/src/app.ts b/Express/barAndCafe/src/app.ts index 7d707fe..6eb0f0d 100644 --- a/Express/barAndCafe/src/app.ts +++ b/Express/barAndCafe/src/app.ts @@ -1,4 +1,4 @@ -import { getCity, getRadius } from "./openTripMaps" +import { getCity, getRadius, getPoiId } from "./openTripMaps" import express from "express" /** * Initialize Express application instance. @@ -91,4 +91,28 @@ app.get("/otm/city", getCity) */ app.get("/otm/radius", getRadius) + +/** + * @openapi + * /otm/poidetaill: + * get: + * summary: detail of a POI + * description: detail of a POI link name, kind, rate,... + * parameters: + * - name: id + * in: query + * required: true + * description: Unique identifier of the object in OpenTripMap + * schema: + * type: string + * 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/poidetaill", getPoiId) + export default app \ No newline at end of file