-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
1 lines (1 loc) · 4.33 KB
/
swagger.json
1
{"swagger":"2.0","host":"localhost:7070","basePath":"/","schemes":["http","https"],"info":{"title":"Gateway API Documentation","version":"1.3.0-beta"},"tags":[],"paths":{"/location":{"get":{"summary":"Get all locations","operationId":"getLocation","tags":["location"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"post":{"summary":"Create a location","operationId":"postLocation","parameters":[{"x-alternatives":[{"$ref":"#/x-alt-definitions/Model2"},{"$ref":"#/x-alt-definitions/Model3"}],"in":"body","name":"body","schema":{"$ref":"#/definitions/Model2"}}],"tags":["location"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/location/{locationId}":{"get":{"summary":"Get a single location","operationId":"getLocationLocationid","parameters":[{"type":"string","name":"locationId","in":"path","required":true}],"tags":["location"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update a location or facility","operationId":"putLocationLocationid","parameters":[{"type":"string","name":"locationId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model5"}}],"tags":["location"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/notification":{"post":{"summary":"Create a health notification","operationId":"postNotification","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model4"}}],"tags":["notification"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}}},"definitions":{"Model1":{"type":"object","properties":{"year":{"type":"number"},"male_population":{"type":"number"},"female_population":{"type":"number"},"population":{"type":"number"},"crude_birth_rate":{"type":"number"}},"required":["year","male_population","female_population","population","crude_birth_rate"]},"statistics":{"type":"array","items":{"$ref":"#/definitions/Model1"}},"Model2":{"type":"object","properties":{"statisticalID":{"type":"string"},"name":{"type":"string"},"alias":{"type":"string"},"partOf":{"type":"string"},"code":{"type":"string","enum":["ADMIN_STRUCTURE","CRVS_OFFICE","HEALTH_FACILITY"]},"jurisdictionType":{"type":"string","enum":["DISTRICT","STATE","LOCATION_LEVEL_1","LOCATION_LEVEL_2","LOCATION_LEVEL_3","LOCATION_LEVEL_4","LOCATION_LEVEL_5"]},"statistics":{"$ref":"#/definitions/statistics"}},"required":["statisticalID","name","partOf","code"]},"meta":{"type":"object","properties":{"lastUpdated":{"type":"string","format":"date-time"}},"required":["lastUpdated"]},"resource":{"type":"object","properties":{"resourceType":{"type":"string","enum":["Patient","RelatedPerson","Encounter","Observation"]}},"required":["resourceType"]},"Model3":{"type":"object","properties":{"fullUrl":{"type":"string"},"resource":{"$ref":"#/definitions/resource"}},"required":["fullUrl","resource"]},"entry":{"type":"array","items":{"$ref":"#/definitions/Model3"}},"Model4":{"type":"object","properties":{"resourceType":{"type":"string","enum":["Bundle"]},"type":{"type":"string","enum":["document"]},"meta":{"$ref":"#/definitions/meta"},"entry":{"$ref":"#/definitions/entry"}},"required":["resourceType","type","meta","entry"]},"Model5":{"type":"object","properties":{"name":{"type":"string"},"alias":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"statistics":{"$ref":"#/definitions/Model1"}}}},"x-alt-definitions":{"Model1":{"type":"object","properties":{"year":{"type":"number"},"male_population":{"type":"number"},"female_population":{"type":"number"},"population":{"type":"number"},"crude_birth_rate":{"type":"number"}},"required":["year","male_population","female_population","population","crude_birth_rate"]},"statistics":{"type":"array","items":{"$ref":"#/x-alt-definitions/Model1"}},"Model2":{"type":"object","properties":{"statisticalID":{"type":"string"},"name":{"type":"string"},"alias":{"type":"string"},"partOf":{"type":"string"},"code":{"type":"string","enum":["ADMIN_STRUCTURE","CRVS_OFFICE","HEALTH_FACILITY"]},"jurisdictionType":{"type":"string","enum":["DISTRICT","STATE","LOCATION_LEVEL_1","LOCATION_LEVEL_2","LOCATION_LEVEL_3","LOCATION_LEVEL_4","LOCATION_LEVEL_5"]},"statistics":{"$ref":"#/x-alt-definitions/statistics"}},"required":["statisticalID","name","partOf","code"]},"Model3":{"type":"array","items":{"$ref":"#/x-alt-definitions/Model2"}}}}