Last active
August 30, 2018 07:47
-
-
Save cuipengfei/4482fa5600c1ee5aec50034862d28eac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
description: "" | |
version: "0.0.1" | |
title: "Search person" | |
host: "swagger.io" | |
basePath: "/" | |
tags: | |
- name: "person" | |
description: "person info" | |
schemes: | |
- "https" | |
- "http" | |
paths: | |
/person/{nric}: | |
parameters: | |
- in: path | |
name: nric | |
required: true | |
type: string | |
get: | |
tags: | |
- "person" | |
summary: "Find person by NRIC" | |
description: "" | |
operationId: "getPersonByNRIC" | |
produces: | |
- "application/json" | |
responses: | |
200: | |
description: "successful operation" | |
schema: | |
$ref: "#/definitions/Person" | |
400: | |
description: "Invalid ID supplied" | |
404: | |
description: "Person not found" | |
security: | |
- api_key: [] | |
securityDefinitions: | |
api_key: | |
type: "apiKey" | |
name: "api_key" | |
in: "header" | |
definitions: | |
Case: | |
type: object | |
properties: | |
title: | |
type: string | |
example: "SCFA investigation" | |
startDate: | |
type: string | |
example: "2003-08-30T02:26:20.044Z" | |
endDate: | |
type: string | |
example: "2007-06-10T02:26:20.044Z" | |
status: | |
type: string | |
example: "closed" | |
disbursementAgency: | |
type: string | |
example: "SSOD HQ" | |
disbursementAmmount: | |
type: number | |
example: 380 | |
benefits: | |
type: array | |
items: | |
type: string | |
example: ["Rental assistance","Polyclinic benefit"] | |
location: | |
type: string | |
example: "Fei yue FSC (champion way)" | |
type: | |
type: string | |
example: "FSC outcome plan" | |
activity: | |
type: string | |
example: "Sleaping in public" | |
reason: | |
type: string | |
example: "Family issues" | |
outcome: | |
type: string | |
example: "Escort home" | |
IncomeInfo: | |
type: object | |
properties: | |
title: | |
type: string | |
example: "Casual work" | |
startDate: | |
type: string | |
example: "2003-08-30T02:26:20.044Z" | |
endDate: | |
type: string | |
example: "2007-06-10T02:26:20.044Z" | |
description: | |
type: string | |
example: "$3000/month. Sales related." | |
Frequency: | |
type: string | |
example: "Monthly" | |
EmploymentInfo: | |
type: object | |
properties: | |
title: | |
type: string | |
example: "Cleaner(full time)" | |
startDate: | |
type: string | |
example: "2008-08-30T02:26:20.044Z" | |
endDate: | |
type: string | |
example: "2013-06-10T02:26:20.044Z" | |
employer: | |
type: string | |
example: "CK department store" | |
HousingInfo: | |
type: object | |
properties: | |
source: | |
type: string | |
example: "HDB" | |
dateOfEntry: | |
type: string | |
example: "2008-08-30T02:11:03.913Z" | |
address: | |
type: string | |
example: "43, Woodland road, #15-129, Singapore 312310" | |
rooms: | |
type: string | |
example: "HDB 3 rooms" | |
type: | |
type: string | |
example: "Rental" | |
RelatedPerson: | |
type: "object" | |
properties: | |
name: | |
type: string | |
example: "Tan Wei Kiong" | |
maritalStatus: | |
type: "string" | |
example: "Married" | |
relation: | |
type: string | |
example: "brother" | |
gender: | |
type: "string" | |
example: "Male" | |
age: | |
type: "number" | |
example: 56 | |
occupation: | |
type: "string" | |
example: "Retried(no income)" | |
isMainCareGiver: | |
type: boolean | |
example: true | |
isDecesead: | |
type: boolean | |
example: false | |
BasicPersonInfo: | |
type: "object" | |
required: | |
- "name" | |
properties: | |
identificationNumber: | |
type: "string" | |
example: "S1234567" | |
identificationType: | |
type: "string" | |
example: "pink" | |
otherIdentificationNumber: | |
type: "string" | |
example: "G4556321" | |
otherIdentificationType: | |
type: "string" | |
example: "passport" | |
citizenShip: | |
type: "string" | |
example: "Singaporean" | |
nationality: | |
type: "string" | |
example: "Singaporean" | |
countryOfBirth: | |
type: "string" | |
example: "Singapore" | |
dateOfBirth: | |
type: "string" | |
example: "1975-08-29T00:00:00.000Z" | |
contactNumber: | |
type: "string" | |
example: "91232098" | |
ethnicity: | |
type: "string" | |
example: "Chinese" | |
gender: | |
type: "string" | |
example: "Female" | |
languages: | |
type: "array" | |
example: ["Chinese","English"] | |
items: | |
type: "string" | |
religion: | |
type: "string" | |
example: "Free Thinker" | |
SocialFamilyInfo: | |
type: "object" | |
properties: | |
maritalStatus: | |
type: "string" | |
example: "Married" | |
relationships: | |
type: "array" | |
items: | |
$ref: '#/definitions/RelatedPerson' | |
Person: | |
type: "object" | |
properties: | |
basicInfo: | |
$ref: "#/definitions/BasicPersonInfo" | |
socialFamilyInfo: | |
$ref: '#/definitions/SocialFamilyInfo' | |
registeredAddresses: | |
type: "array" | |
items: | |
$ref: '#/definitions/HousingInfo' | |
correspondenceAddresses: | |
type: "array" | |
items: | |
$ref: '#/definitions/HousingInfo' | |
employments: | |
type: array | |
items: | |
$ref: '#/definitions/EmploymentInfo' | |
incomes: | |
type: array | |
items: | |
$ref: '#/definitions/IncomeInfo' | |
caseHistory: | |
type: array | |
items: | |
$ref: '#/definitions/Case' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment