---
swagger: "2.0"
info:
  description: "Sample swagger file with a definition containing a range of types to\
    \ demonstrate how these types are converted into a Flink SQL table definition\n"
  version: "1.0.0"
  title: "Sample API"
host: "api.mycompany.com"
basePath: "/"
schemes:
- "https"
consumes:
- "application/json"
produces:
- "application/json"
paths:
  /individual/lookup:
    post:
      tags:
      - "Individual"
      summary: "Get properties of an individual"
      description: "Returns properties of an individual and related addresses"
      parameters:
      - in: "body"
        name: "individualID"
        description: "The input parameter must be the ID of the individual"
        required: false
        schema:
          properties:
            individualIdentifier:
              $ref: "#/definitions/individualIDdefinition"
      responses:
        "200":
          description: "OK - Successful search"
          schema:
            $ref: "#/definitions/identityInternal"
        "400":
          description: "Bad Request"
          schema:
            properties:
              error:
                $ref: "#/definitions/error"
        "404":
          description: "Not Found"
          schema:
            properties:
              error:
                $ref: "#/definitions/error"
        "500":
          description: "Internal Server Error"
          schema:
            properties:
              error:
                $ref: "#/definitions/error"
definitions:
  individualIDdefinition:
    type: "object"
    properties:
      id:
        type: "string"
        description: "The unique identifier of the individual"
        x-ing-type: "string"
  identityInternal:
    allOf:
    - type: "object"
      properties:
        individual:
          $ref: "#/definitions/individual"
        addresses:
          type: "array"
          items:
            $ref: "#/definitions/address"
          x-ing-type: "array"
  individual:
    allOf:
    - type: "object"
      properties:
        id:
          type: "string"
          example: "12345"
          x-ing-type: "string"
    - type: "object"
      properties:
        firstName:
          type: "string"
          example: "John"
          description: "First name of the individual"
          x-ing-type: "string"
    - type: "object"
      properties:
        lastName:
          type: "string"
          example: "Doe"
          description: "Last name of the individual"
          x-ing-type: "string"
    - type: "object"
      properties:
        date_of_birth:
          type: "string"
          example: "1990-12-31"
          description: "the date of birth of the individual"
          x-ing-type: "date"
    - type: "object"
      properties:
        firstName:
          type: "string"
          example: "John"
          description: "First name of the individual"
          x-ing-type: "string"
    - type: "boolean"
      properties:
        someBoolean:
          type: "boolean"
          example: true
          description: "Example of a boolean"
          x-ing-type: "boolean"
    - type: "integer"
      properties:
        someInteger:
          type: "integer"
          format: "int64"
          description: "Example of an integer"
          x-ing-type: "integer"
    - type: "number"
      properties:
        someNumber:
          type: "number"
          description: "Example of a number"
          x-ing-type: "number"
  address:
    type: "object"
    properties:
      street:
        type: "string"
        example: "Wall street"
        description: "Name of the street"
        x-ing-type: "string"
      housenumber:
        type: "number"
        description: "House number"
        x-ing-type: "number"
      country:
        type: "string"
        example: "US"
        description: "List of ISO 3166-1 alpha-3 codes"
        x-ing-type: "string"
        enum:
          - "NLD"
          - "USA"
          - "DEU"
          - "Etc"
  error:
    type: "object"
    properties:
      errorCode:
        type: "string"
        x-ing-type: "string"
      message:
        type: "string"
        x-ing-type: "string"
      innerErrors:
        type: "array"
        items:
          $ref: "#/definitions/errorDetail"
        x-ing-type: "array"
  errorDetail:
    type: "object"
    properties:
      detailedMessage:
        type: "string"
        x-ing-type: "string"
