add route and swagger doc
All checks were successful
Build Docker Image Front / run (pull_request) Successful in 27s
Build Docker Image Back / run (pull_request) Successful in 44s
JsDocs / coverage (pull_request) Successful in 37s
Test and coverage / coverage (pull_request) Successful in 1m16s

This commit is contained in:
Clement 2024-05-18 13:04:59 +02:00
parent 9ac4ba7252
commit ae9e1eae47

View File

@ -1,4 +1,4 @@
import { getCity, getRadius } from "./openTripMaps" import { getCity, getRadius, getPoiId } from "./openTripMaps"
import express from "express" import express from "express"
/** /**
* Initialize Express application instance. * Initialize Express application instance.
@ -91,4 +91,28 @@ app.get("/otm/city", getCity)
*/ */
app.get("/otm/radius", getRadius) 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 export default app