Commit 81a2e5a7 authored by calocedre TAC's avatar calocedre TAC
Browse files

add openapi spec

parent f8da2e23
{"openapi":"3.0.3","info":{"title":"Tous AntiCovid Cluster Exposure Verification (Cléa)","description":"#TOUSANTICOVID, Cléa API","contact":{"email":"stopcovid@inria.fr"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"1.0.0"},"servers":[{"url":"http://localhost:8080","description":"Inferred Url"}],"tags":[{"name":"clea","description":"Clea API"}],"paths":{"/api/clea/v1/wreport":{"post":{"tags":["clea"],"summary":"Upload locations history","description":"Upload a list of {qrCode, timestamp} tuples where :\n* **qrCode**: QR code content encoded in Base64\n* **qrCodeScanTime**: NTP timestamp when a user terminal scans a given QR code\n","operationId":"reportUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"},"examples":{"example-0":{"value":"{\n \"success\": \"true\",\n \"message\": \"2 qr processed, 0 rejected\"\n}"}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Error"}},"security":[{"Authorization":["global"]}]}}},"components":{"schemas":{"ReportRequest":{"title":"ReportRequest","required":["pivotDate","visits"],"type":"object","properties":{"pivotDate":{"type":"integer","format":"int64"},"visits":{"type":"array","items":{"$ref":"#/components/schemas/Visit"}}}},"ReportResponse":{"title":"ReportResponse","type":"object","properties":{"message":{"type":"string"},"success":{"type":"boolean"}}},"Visit":{"title":"Visit","required":["qrCode","qrCodeScanTime"],"type":"object","properties":{"qrCode":{"type":"string"},"qrCodeScanTime":{"type":"integer","format":"int64"}}}},"securitySchemes":{"Authorization":{"type":"apiKey","name":"Authorization","in":"header"}}}}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment