Skip to content

Instantly share code, notes, and snippets.

@gbvanrenswoude
Created October 27, 2021 21:46
Show Gist options
  • Save gbvanrenswoude/1143a79dd6f150931c5c00826f6454a2 to your computer and use it in GitHub Desktop.
Save gbvanrenswoude/1143a79dd6f150931c5c00826f6454a2 to your computer and use it in GitHub Desktop.
whoof.json OAS
{
"openapi": "3.0.1",
"info": {
"title": "fwhoof",
"version": "2021-10-17T18:09:20Z"
},
"servers": [
{
"url": "https://whoof.corp"
}
],
"paths": {
"/api/{administratie}/{relatiesoort}/{identifier}/events": {
"post": {
"parameters": [
{
"name": "identifier",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "relatiesoort",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "administratie",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventModel"
}
}
},
"required": true
},
"responses": {
"404": {
"description": "404 response",
"content": {}
},
"200": {
"description": "200 response",
"content": {}
},
"201": {
"description": "201 response",
"content": {}
},
"422": {
"description": "422 response",
"content": {}
}
},
"security": [
{
"whoofsec": []
},
{
"api_key": []
}
]
}
}
},
"components": {
"schemas": {
"EventModel": {
"title": "Event Model",
"required": [
"correlatie_id",
"event_payload",
"event_title"
],
"type": "object",
"properties": {
"event_payload": {
"title": "Event Payload",
"anyOf": [
{
"$ref": "#/components/schemas/ApiContactPersoonPayload"
},
{
"$ref": "#/components/schemas/ApiNewContactPersoonPayload"
},
{
"$ref": "#/components/schemas/ApiPersoonPayload"
},
{
"$ref": "#/components/schemas/ApiWerkgeverPayload"
}
]
},
"correlatie_id": {
"title": "Correlatie Id",
"type": "string"
},
"event_title": {
"title": "Event Title",
"type": "string"
}
},
"additionalProperties": false
},
"ApiAdresSoort": {
"title": "ApiAdresSoort",
"description": "An enumeration.",
"enum": [
"HolidayAdress",
"HomeAdress"
],
"type": "string"
},
"ApiAdresMutatie": {
"title": "ApiAdresMutatie",
"type": "object",
"properties": {
"straat": {
"title": "Straat",
"type": "string"
},
"plaats": {
"title": "Plaats",
"type": "string"
},
"land": {
"title": "Land",
"type": "string"
},
"soort": {
"$ref": "#/components/schemas/ApiAdresSoort"
},
"huisnummer": {
"title": "Huisnummer",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"huisnummertoevoeging": {
"title": "Huisnummertoevoeging",
"type": "string"
},
"postcode": {
"title": "Postcode",
"type": "string"
},
"landnaam": {
"title": "Landnaam",
"type": "string"
},
"verwijderd": {
"title": "Verwijderd",
"type": "boolean"
},
"einddatum": {
"title": "Einddatum",
"type": "string"
}
},
"required": [
"soort"
],
"additionalProperties": false
},
"ApiKanaalVoorkeur": {
"title": "ApiKanaalVoorkeur",
"description": "An enumeration.",
"enum": [
"MAIL",
"LETTER",
"PIDGEON"
],
"type": "string"
},
"ApiFunctieGroep": {
"title": "ApiFunctieGroep",
"description": "An enumeration.",
"enum": [
"TechChump",
"BigManagerBoss"
],
"type": "string"
},
"ApiContactPersoonPayload": {
"title": "ApiContactPersoonPayload",
"description": "Base properties for all api fields",
"type": "object",
"properties": {
"adressen": {
"title": "Adressen",
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiAdresMutatie"
}
},
"kanaalvoorkeur": {
"$ref": "#/components/schemas/ApiKanaalVoorkeur"
},
"magazine": {
"$ref": "#/components/schemas/ApiKanaalVoorkeur"
},
"telefoonnummer2": {
"title": "Telefoonnummer2",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"voornaam": {
"title": "Voornaam",
"type": "string"
},
"achternaam": {
"title": "Achternaam",
"type": "string"
},
"werkgevernummer": {
"title": "Werkgevernummer",
"type": "string"
},
"functie": {
"title": "Functie",
"type": "string"
},
"actief": {
"title": "Actief",
"type": "boolean"
},
"aanhef": {
"title": "Aanhef",
"type": "string"
},
"tussenvoegsel": {
"title": "Tussenvoegsel",
"type": "string"
},
"geslacht": {
"title": "Geslacht",
"type": "string"
},
"functiegroep": {
"$ref": "#/components/schemas/ApiFunctieGroep"
},
"datum_laatste_wijziging": {
"title": "Datum Laatste Wijziging",
"type": "string"
},
"laatste_wijziging_door": {
"title": "Laatste Wijziging Door",
"type": "string"
},
"officieel": {
"title": "Officieel",
"type": "boolean"
}
},
"additionalProperties": false
},
"ApiNewContactPersoonPayload": {
"title": "ApiNewContactPersoonPayload",
"description": "Base properties for all api fields",
"type": "object",
"properties": {
"adressen": {
"title": "Adressen",
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiAdresMutatie"
}
},
"kanaalvoorkeur": {
"$ref": "#/components/schemas/ApiKanaalVoorkeur"
},
"magazine": {
"$ref": "#/components/schemas/ApiKanaalVoorkeur"
},
"telefoonnummer2": {
"title": "Telefoonnummer2",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"voornaam": {
"title": "Voornaam",
"type": "string"
},
"achternaam": {
"title": "Achternaam",
"type": "string"
},
"werkgevernummer": {
"title": "Werkgevernummer",
"type": "string"
},
"functie": {
"title": "Functie",
"type": "string"
},
"actief": {
"title": "Actief",
"type": "boolean"
},
"aanhef": {
"title": "Aanhef",
"type": "string"
},
"tussenvoegsel": {
"title": "Tussenvoegsel",
"type": "string"
},
"geslacht": {
"title": "Geslacht",
"type": "string"
},
"functiegroep": {
"$ref": "#/components/schemas/ApiFunctieGroep"
},
"datum_laatste_wijziging": {
"title": "Datum Laatste Wijziging",
"type": "string"
},
"laatste_wijziging_door": {
"title": "Laatste Wijziging Door",
"type": "string"
},
"officieel": {
"title": "Officieel",
"type": "boolean"
}
},
"required": [
"werkgevernummer"
],
"additionalProperties": false
},
"ApiDatumDelen": {
"title": "ApiDatumDelen",
"type": "object",
"properties": {
"jaar": {
"title": "Jaar",
"type": "integer"
},
"maand": {
"title": "Maand",
"type": "integer"
},
"dag": {
"title": "Dag",
"type": "integer"
}
},
"required": [
"jaar",
"maand",
"dag"
],
"additionalProperties": false
},
"ApiPersoonPayload": {
"title": "ApiPersoonPayload",
"description": "Base properties for all api fields",
"type": "object",
"properties": {
"adressen": {
"title": "Adressen",
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiAdresMutatie"
}
},
"kanaalvoorkeur": {
"$ref": "#/components/schemas/ApiKanaalVoorkeur"
},
"magazine": {
"$ref": "#/components/schemas/ApiKanaalVoorkeur"
},
"telefoonnummer2": {
"title": "Telefoonnummer2",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"relatienummer": {
"title": "Relatienummer",
"type": "string"
},
"opgemaakteNaam": {
"title": "Opgemaaktenaam",
"type": "string"
},
"Geboortedatum": {
"$ref": "#/components/schemas/ApiDatumDelen"
},
"Overlijdensdatum": {
"$ref": "#/components/schemas/ApiDatumDelen"
},
"bewindvoering": {
"title": "Bewindvoering",
"type": "boolean"
}
},
"additionalProperties": false
},
"ApiWerkgeverPayload": {
"title": "ApiWerkgeverPayload",
"description": "Base properties for all api fields",
"type": "object",
"properties": {
"adressen": {
"title": "Adressen",
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiAdresMutatie"
}
},
"kanaalvoorkeur": {
"$ref": "#/components/schemas/ApiKanaalVoorkeur"
},
"magazine": {
"$ref": "#/components/schemas/ApiKanaalVoorkeur"
},
"telefoonnummer2": {
"title": "Telefoonnummer2",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"relatienummer": {
"title": "Relatienummer",
"type": "string"
},
"naam": {
"title": "Naam",
"type": "string"
},
"emailHR": {
"title": "Emailhr",
"type": "string"
},
"emailFinance": {
"title": "Emailfinance",
"type": "string"
}
},
"additionalProperties": false
}
},
"securitySchemes": {
"api_key": {
"type": "apiKey",
"name": "x-api-key",
"in": "header"
},
"whoofsec": {
"type": "http",
"scheme": "basic"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment