Created
October 30, 2019 08:58
-
-
Save danielgelling/d816b09e76bf662723776ab07de1dd90 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":{ | |
"title":"REDACTED API", | |
"version":"1.0.0" | |
}, | |
"host":"redacted.url.com", | |
"schemes":[ | |
"http", | |
"https" | |
], | |
"paths":{ | |
"/contacts":{ | |
"get":{ | |
"summary":"Returns a list of contacts associated with the organization.", | |
"description":"Returns a list of contacts associated with the organization", | |
"operationId":"getContacts", | |
"parameters":[ | |
{ | |
"$ref":"#/parameters/HQL" | |
} | |
], | |
"responses":{ | |
"200":{ | |
"description":"A list of contacts.", | |
"schema":{ | |
"$ref":"#/definitions/FilteredContactCollection" | |
} | |
}, | |
"403":{ | |
"description":"Access denied." | |
} | |
}, | |
"tags":[ | |
"contact" | |
] | |
} | |
}, | |
"/contact/{id}":{ | |
"get":{ | |
"summary":"Returns a single contact based on the given ID.", | |
"description":"Returns a single contact based on the given ID.", | |
"operationId":"getContact", | |
"parameters":[ | |
{ | |
"name":"id", | |
"in":"path", | |
"required":true, | |
"type":"integer" | |
} | |
], | |
"responses":{ | |
"200":{ | |
"description":"A Contact model.", | |
"schema":{ | |
"$ref":"#/definitions/Contact" | |
} | |
}, | |
"403":{ | |
"description":"Access denied." | |
} | |
}, | |
"tags":[ | |
"contact" | |
] | |
} | |
} | |
}, | |
"definitions":{ | |
"FilteredContactCollection":{ | |
"properties":{ | |
"items":{ | |
"items":{ | |
"$ref":"#/definitions/Contact" | |
}, | |
"type":"array" | |
}, | |
"maxResults":{ | |
"description":"The total amount of records in the entire collection.", | |
"type":"number" | |
}, | |
"limit":{ | |
"description":"The amount of results, as requested.", | |
"type":"number" | |
}, | |
"offset":{ | |
"description":"The starting index.", | |
"type":"number" | |
} | |
}, | |
"type":"object" | |
}, | |
"Contact":{ | |
"required":[ | |
"name", | |
"streetName", | |
"houseNumber", | |
"contactType" | |
], | |
"properties":{ | |
"id":{ | |
"description":"ID of contact", | |
"type":"integer" | |
}, | |
"name":{ | |
"description":"Name of contact", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"streetName":{ | |
"description":"Street name of contact", | |
"type":"string" | |
}, | |
"houseNumber":{ | |
"description":"House number (incl. additions)", | |
"type":"string" | |
}, | |
"zipCode":{ | |
"description":"Zip-code", | |
"type":"string", | |
"maxLength":20 | |
}, | |
"city":{ | |
"description":"City name", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"countryCode":{ | |
"description":"An ISO 3166-2 representation of the country", | |
"type":"string", | |
"maxLength":2 | |
}, | |
"information":{ | |
"description":"Additional information about the contact", | |
"type":"string" | |
}, | |
"contactPersonName":{ | |
"description":"The name of person to contact", | |
"type":"string" | |
}, | |
"planning":{ | |
"description":"Planning text", | |
"type":"string" | |
}, | |
"cocNumber":{ | |
"description":"The chamber of commerce number", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"vatNumber":{ | |
"description":"The value added tax number", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"accountNumber":{ | |
"description":"The account number", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"hourlyRate":{ | |
"description":"The hourly rate", | |
"type":"string", | |
"pattern":"/^\\s*[-+]?[0-9]*[.,]?[0-9]+([eE][-+]?[0-9]+)?\\s*$/" | |
}, | |
"sellingHourlyRate":{ | |
"description":"The selling hourly rate", | |
"type":"string", | |
"pattern":"/^\\s*[-+]?[0-9]*[.,]?[0-9]+([eE][-+]?[0-9]+)?\\s*$/" | |
}, | |
"agreedHourlyRate":{ | |
"description":"The agreed hourly rate", | |
"type":"string", | |
"pattern":"/^\\s*[-+]?[0-9]*[.,]?[0-9]+([eE][-+]?[0-9]+)?\\s*$/" | |
}, | |
"email":{ | |
"description":"The email address", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"phoneNumber":{ | |
"description":"The phone number", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"mobileNumber":{ | |
"description":"The mobile phone number", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"debtorNumber":{ | |
"description":"The debtor number", | |
"type":"string", | |
"maxLength":256 | |
}, | |
"glnNumber":{ | |
"description":"The Global Location Number", | |
"type":"string", | |
"maxLength":13 | |
}, | |
"contactType":{ | |
"$ref":"#/definitions/ContactType" | |
}, | |
"createdBy":{ | |
"description":"The user that created this Contact.", | |
"readOnly":"true", | |
"type":"string" | |
}, | |
"updatedBy":{ | |
"description":"The user that last updated the Contact.", | |
"readOnly":"true", | |
"type":"string" | |
}, | |
"createdAt":{ | |
"description":"The creation time of the Contact.", | |
"readOnly":"true", | |
"type":"string" | |
}, | |
"updatedAt":{ | |
"description":"The last updated time of the Contact.", | |
"readOnly":"true", | |
"type":"string" | |
} | |
}, | |
"type":"object" | |
}, | |
"ContactType":{ | |
"properties":{ | |
"id":{ | |
"description":"ID of contact type", | |
"type":"integer" | |
}, | |
"name":{ | |
"description":"Name of contact type", | |
"type":"string" | |
} | |
}, | |
"type":"object" | |
} | |
}, | |
"parameters":{ | |
"HQL":{ | |
"name":"q", | |
"in":"query", | |
"required":false, | |
"description":"Filter collections with HQL", | |
"type":"string" | |
} | |
}, | |
"securityDefinitions":{ | |
"Bearer":{ | |
"name":"Authorization", | |
"type":"apiKey", | |
"in":"header", | |
"description":"Value: Bearer {jwt}" | |
} | |
}, | |
"security":[ | |
{ | |
"Bearer":[ | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment