{
  "openapi": "3.1.1",
  "info": {
    "title": "Squirrel.DecisionEngine.Api",
    "version": "feature/projects/1:cb703447"
  },
  "servers": [
    {
      "url": "https://api-de.squirrel.co.nz/"
    }
  ],
  "paths": {
    "/decision": {
      "post": {
        "tags": [
          "CallerOwnedDecisionEndpoint"
        ],
        "operationId": "CallerOwnedDecision",
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required"
          },
          "422": {
            "description": "Unprocessable Entity - Business rule violation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "tags": [
          "Squirrel.DecisionEngine.Api"
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized - Authentication required"
          }
        }
      }
    },
    "/ping/anonymous": {
      "get": {
        "tags": [
          "Ping"
        ],
        "summary": "Handles an anonymous ping request",
        "operationId": "ByAnonymous",
        "parameters": [
          {
            "name": "delayMs",
            "in": "query",
            "description": "The delay, in milliseconds, before responding to the request",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The response message as plain text",
            "content": {
              "text/plain": { }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required"
          }
        }
      }
    },
    "/ping/client-secret": {
      "get": {
        "tags": [
          "Ping"
        ],
        "summary": "Handles a ping request that requires client authentication",
        "operationId": "ByClient",
        "parameters": [
          {
            "name": "delayMs",
            "in": "query",
            "description": "The delay, in milliseconds, before responding to the request",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The response message as plain text",
            "content": {
              "text/plain": { }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required"
          }
        }
      }
    },
    "/ping/aad": {
      "get": {
        "tags": [
          "Ping"
        ],
        "summary": "Handles a ping request authenticated via Azure Active Directory",
        "operationId": "ByAzureActiveDirectory",
        "parameters": [
          {
            "name": "delayMs",
            "in": "query",
            "description": "The delay, in milliseconds, before responding to the request",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The response message as plain text",
            "content": {
              "text/plain": { }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required"
          }
        }
      }
    },
    "/ping/serialize": {
      "post": {
        "tags": [
          "Ping"
        ],
        "operationId": "Serialize",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PingForm"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PingForm"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PingForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PongDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PongDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PongDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required"
          },
          "400": {
            "description": "Bad Request - Validation failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity - Business rule violation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/ping/error": {
      "get": {
        "tags": [
          "Ping"
        ],
        "operationId": "ServerError",
        "parameters": [
          {
            "name": "custom",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ServerErrorDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerErrorDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerErrorDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorDetailsDto": {
        "required": [
          "message",
          "innerError"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "tokens": {
            "type": [
              "null",
              "object"
            ]
          },
          "stackTrace": {
            "type": [
              "null",
              "string"
            ]
          },
          "innerError": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ErrorDetailsDto"
              }
            ]
          }
        }
      },
      "PingForm": {
        "required": [
          "myName"
        ],
        "type": "object",
        "properties": {
          "myName": {
            "type": "string"
          }
        }
      },
      "PongDto": {
        "required": [
          "response"
        ],
        "type": "object",
        "properties": {
          "response": {
            "type": "string"
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ServerErrorDto": {
        "required": [
          "errorReference",
          "userMessage"
        ],
        "type": "object",
        "properties": {
          "errorReference": {
            "type": "string"
          },
          "userMessage": {
            "type": "string"
          },
          "traceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "details": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ErrorDetailsDto"
              }
            ]
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "CallerOwnedDecisionEndpoint"
    },
    {
      "name": "Squirrel.DecisionEngine.Api"
    },
    {
      "name": "Ping"
    }
  ]
}