{"openapi":"3.0.0","info":{"version":"2.0.0","title":"Passport Visa API","contact":{"email":"nixon@nickypangers.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"https://rough-sun-2523.fly.dev/"}],"externalDocs":{"description":"Find out more about Passport Visa API","url":"https://github.com/nickypangers/passport-visa-api"},"components":{"schemas":{"Country":{"type":"object","properties":{"name":{"type":"string","example":"United States"},"code":{"type":"string","example":"US"},"VR":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Canada"},"code":{"type":"string","example":"CA"},"duration":{"type":"number","nullable":true,"example":30}},"required":["name","code","duration"]},"example":[{"name":"Canada","code":"CA","duration":30}]},"VOA":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Canada"},"code":{"type":"string","example":"CA"},"duration":{"type":"number","nullable":true,"example":30}},"required":["name","code","duration"]},"example":[{"name":"India","code":"IN","duration":30}]},"VF":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Canada"},"code":{"type":"string","example":"CA"},"duration":{"type":"number","nullable":true,"example":30}},"required":["name","code","duration"]},"example":[{"name":"Australia","code":"AU","duration":30}]},"EV":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Canada"},"code":{"type":"string","example":"CA"},"duration":{"type":"number","nullable":true,"example":30}},"required":["name","code","duration"]},"example":[{"name":"China","code":"CN","duration":30}]},"NA":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Canada"},"code":{"type":"string","example":"CA"},"duration":{"type":"number","nullable":true,"example":30}},"required":["name","code","duration"]},"example":[{"name":"Brazil","code":"BR","duration":30}]},"last_updated":{"type":"string","example":"2021-09-01T00:00:00.000Z"}},"required":["name","code","VR","VOA","VF","EV","NA","last_updated"]},"Visa":{"type":"object","properties":{"id":{"type":"string","example":"1"},"passport":{"type":"object","properties":{"name":{"type":"string","example":"United States"},"code":{"type":"string","example":"US"}},"required":["name","code"],"example":{"name":"United States","code":"US"}},"destination":{"type":"object","properties":{"name":{"type":"string","example":"Canada"},"code":{"type":"string","example":"CA"}},"required":["name","code"],"example":{"name":"Canada","code":"CA"}},"dur":{"type":"number","nullable":true,"example":30},"category":{"type":"object","properties":{"name":{"type":"string","example":"Visa Free"},"code":{"type":"string","example":"VF"}},"required":["name","code"],"example":{"name":"Visa Free","code":"VF"}},"last_updated":{"type":"string","example":"2021-08-01T00:00:00Z"}},"required":["id","passport","destination","dur","category","last_updated"]}},"parameters":{}},"paths":{"/country/{code}":{"get":{"parameters":[{"schema":{"type":"string","example":"US"},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"Return country visa information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Country"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Passport not found"}},"required":["message"]}}}}}}},"/visa/{pcode}/{dcode}":{"get":{"parameters":[{"schema":{"type":"string","example":"US"},"required":true,"name":"pcode","in":"path"},{"schema":{"type":"string","example":"CA"},"required":true,"name":"dcode","in":"path"}],"responses":{"200":{"description":"Return visa information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Visa"}}}},"500":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Passport not found"}},"required":["message"]}}}}}}}}}