{
  "openapi": "3.0.0",
  "info": {
    "title": "PSX",
    "version": "0.1"
  },
  "paths": {
    "/api/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "schema": {
            "type": "integer"
          }
        }
      ],
      "get": {
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Property"
                }
              }
            }
          }
        }
      },
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Property"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200 Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Property"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Any": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "ChoiceA": {
        "type": "object",
        "properties": {
          "foo": {
            "type": "string"
          }
        },
        "required": [
          "foo"
        ]
      },
      "ChoiceB": {
        "type": "object",
        "properties": {
          "bar": {
            "type": "string"
          }
        },
        "required": [
          "bar"
        ]
      },
      "Complex": {
        "type": "object",
        "properties": {
          "foo": {
            "type": "string"
          }
        }
      },
      "Property": {
        "type": "object",
        "properties": {
          "any": {
            "$ref": "#/components/schemas/Any"
          },
          "array": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "arrayComplex": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Complex"
            }
          },
          "arrayChoice": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ChoiceA"
                },
                {
                  "$ref": "#/components/schemas/ChoiceB"
                }
              ]
            }
          },
          "boolean": {
            "type": "boolean"
          },
          "choice": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChoiceA"
              },
              {
                "$ref": "#/components/schemas/ChoiceB"
              }
            ]
          },
          "complex": {
            "$ref": "#/components/schemas/Complex"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "dateTime": {
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "type": "string",
            "format": "duration"
          },
          "float": {
            "type": "number"
          },
          "integer": {
            "type": "integer"
          },
          "string": {
            "type": "string"
          },
          "time": {
            "type": "string",
            "format": "time"
          }
        }
      }
    }
  }
}
