This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.json
1 lines (1 loc) · 6.21 KB
/
swagger.json
1
{"openapi":"3.0.1","info":{"title":"Swedish Test proof REST API","description":"This is the REST API description for the Swedish test proof solution.","contact":{"name":"Myndigheten för Digital förvaltning","url":"http://www.digg.se","email":"info@digg.se"},"license":{"name":"MIT License"},"version":"0.1"},"servers":[{"url":"https://localhost:8543","description":"Generated server url"}],"paths":{"/recovery":{"post":{"tags":["test-submission-controller"],"summary":"Operation for submitting a test observation to create a recovery proof","operationId":"submitObservationForRecoveryProof","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"string"},"organization":{"$ref":"#/components/schemas/OrganizationUser"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryProofResponse"}}}}}}},"/observation":{"post":{"tags":["test-submission-controller"],"summary":"Operation for submitting a test observation","operationId":"submitObservation","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"string"},"organization":{"$ref":"#/components/schemas/OrganizationUser"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSubmissionResponse"}}}}}}},"/ping":{"get":{"tags":["test-submission-controller"],"summary":"Operation for ping service","operationId":"pingServiceEndPoint","parameters":[{"name":"organization","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OrganizationUser"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"components":{"schemas":{"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"OrganizationUser":{"type":"object","properties":{"enabled":{"type":"boolean"},"password":{"type":"string"},"authorities":{"type":"array","items":{"$ref":"#/components/schemas/GrantedAuthority"}},"username":{"type":"string"},"uvciPrefix":{"type":"string"},"credentialsNonExpired":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"}}},"Delivery":{"required":["serviceSupplier"],"type":"object","properties":{"serviceSupplier":{"maxLength":2147483647,"minLength":1,"type":"string"},"delivered":{"type":"boolean"},"message":{"maxLength":2147483647,"minLength":1,"type":"string"}}},"Proof":{"required":["content","mimetype"],"type":"object","properties":{"mimetype":{"maxLength":2147483647,"minLength":3,"type":"string"},"content":{"type":"string"},"delivery":{"$ref":"#/components/schemas/Delivery"},"fileName":{"maxLength":2147483647,"minLength":1,"type":"string"}}},"ProofQRCode":{"required":["height","image","mimetype","width"],"type":"object","properties":{"mimetype":{"maxLength":2147483647,"minLength":3,"type":"string"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"image":{"type":"string"}}},"Recovery":{"required":["positiveTestResultDate"],"type":"object","properties":{"positiveTestResultDate":{"type":"string","format":"date"}}},"RecoveryProof":{"required":["metadata","qrCode","recovery","subject"],"type":"object","properties":{"qrCode":{"$ref":"#/components/schemas/ProofQRCode"},"metadata":{"$ref":"#/components/schemas/RecoveryProofMetadata"},"subject":{"$ref":"#/components/schemas/TestPersonData"},"recovery":{"$ref":"#/components/schemas/Recovery"}}},"RecoveryProofMetadata":{"required":["country","issuanceDate","issuer","uvci","validThrough"],"type":"object","properties":{"uvci":{"maxLength":2147483647,"minLength":1,"type":"string"},"issuanceDate":{"type":"string","format":"date"},"validThrough":{"type":"string","format":"date-time"},"issuer":{"maxLength":2147483647,"minLength":1,"type":"string"},"country":{"maxLength":2147483647,"minLength":2,"type":"string"}}},"RecoveryProofResponse":{"required":["proofTypes","recoveryProof"],"type":"object","properties":{"recoveryProof":{"$ref":"#/components/schemas/RecoveryProof"},"proofTypes":{"type":"array","items":{"$ref":"#/components/schemas/Proof"}}}},"TestPersonData":{"type":"object","properties":{"identity":{"maxLength":12,"minLength":12,"pattern":"^((19|20)[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1]|6[1-9]|7[0-9]|8[0-9]|9[0-1])[0-9]{4})$","type":"string"},"givenName":{"maxLength":2147483647,"minLength":0,"type":"string"},"familyName":{"maxLength":2147483647,"minLength":1,"type":"string"},"birthDate":{"type":"string","format":"date"},"birthDateString":{"maxLength":10,"minLength":0,"pattern":"^((19|20)\\d\\d(-\\d\\d){0,2}){0,1}$","type":"string"}}},"Coding":{"required":["code","display"],"type":"object","properties":{"code":{"type":"string"},"display":{"type":"string"}}},"Test":{"required":["id","targetDisease","testResult","typeOfTest"],"type":"object","properties":{"id":{"type":"string"},"typeOfTest":{"$ref":"#/components/schemas/Coding"},"testName":{"maxLength":2147483647,"minLength":1,"type":"string"},"sampleCollectionDateTime":{"type":"string","format":"date-time"},"testResult":{"$ref":"#/components/schemas/Coding"},"testManufacturer":{"$ref":"#/components/schemas/Coding"},"targetDisease":{"$ref":"#/components/schemas/Coding"},"testProvider":{"$ref":"#/components/schemas/Coding"}}},"TestProof":{"required":["metadata","qrCode","subject","test"],"type":"object","properties":{"qrCode":{"$ref":"#/components/schemas/ProofQRCode"},"metadata":{"$ref":"#/components/schemas/TestProofMetadata"},"subject":{"$ref":"#/components/schemas/TestPersonData"},"test":{"$ref":"#/components/schemas/Test"}}},"TestProofMetadata":{"required":["country","issuanceDate","issuer","uvci","validThrough"],"type":"object","properties":{"uvci":{"maxLength":2147483647,"minLength":1,"type":"string"},"issuanceDate":{"type":"string","format":"date"},"validThrough":{"type":"string","format":"date-time"},"issuer":{"maxLength":2147483647,"minLength":1,"type":"string"},"country":{"maxLength":2147483647,"minLength":2,"type":"string"}}},"TestSubmissionResponse":{"required":["proofTypes","testProof"],"type":"object","properties":{"testProof":{"$ref":"#/components/schemas/TestProof"},"proofTypes":{"type":"array","items":{"$ref":"#/components/schemas/Proof"}}}}}}}