﻿{
  "openapi": "3.2.0",
  "info": {
    "title": "Sample | controllers",
    "version": "1.0.0"
  },
  "paths": {
    "/getbyidandname/{id}/{name}": {
      "get": {
        "tags": [
          "Test"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "minLength": 5,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/gettypedresult": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvcTodo"
                }
              }
            }
          }
        }
      }
    },
    "/forms": {
      "post": {
        "tags": [
          "Test"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Title": {
                    "type": "string"
                  },
                  "Description": {
                    "type": "string"
                  },
                  "IsCompleted": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/getcultureinvariant": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentWeather"
                }
              }
            }
          }
        }
      }
    },
    "/query": {
      "query": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentWeather"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentWeather"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentWeather"
                }
              }
            }
          }
        }
      }
    },
    "/unsupported": {
      "additionalOperations": {
        "FOO": {
          "tags": [
            "Test"
          ],
          "responses": {
            "200": {
              "description": "OK",
              "content": {
                "text/plain": {
                  "schema": {
                    "$ref": "#/components/schemas/CurrentWeather"
                  }
                },
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/CurrentWeather"
                  }
                },
                "text/json": {
                  "schema": {
                    "$ref": "#/components/schemas/CurrentWeather"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/query-with-body": {
      "query": {
        "tags": [
          "Test"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MvcTodo"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MvcTodo"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MvcTodo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MvcTodo"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvcTodo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvcTodo"
                }
              }
            }
          }
        }
      }
    },
    "/multi-content-type": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvcTodo"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/any-of": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/CurrentWeather"
                    },
                    {
                      "$ref": "#/components/schemas/MvcTodo"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/dup-description": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "Use it!\n\nReturns a Todo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvcTodo"
                }
              }
            }
          }
        }
      }
    },
    "/union-pet": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UnionPet"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnionPet"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnionPet"
                }
              }
            }
          }
        }
      }
    },
    "/union-value": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UnionIntString"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnionIntString"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnionIntString"
                }
              }
            }
          }
        }
      }
    },
    "/union-clinic": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Clinic"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Clinic"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Clinic"
                }
              }
            }
          }
        }
      }
    },
    "/union-any-of": {
      "get": {
        "tags": [
          "Test"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Clinic"
                    },
                    {
                      "$ref": "#/components/schemas/UnionPet"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Clinic": {
        "required": [
          "address",
          "patient"
        ],
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "patient": {
            "$ref": "#/components/schemas/UnionPet"
          }
        }
      },
      "CurrentWeather": {
        "type": "object",
        "properties": {
          "temperature": {
            "maximum": 100.5,
            "minimum": -100.5,
            "type": "number",
            "format": "float",
            "default": 0.1
          }
        }
      },
      "Kitten": {
        "required": [
          "name",
          "lives"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "lives": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "MvcTodo": {
        "required": [
          "title",
          "description",
          "isCompleted"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isCompleted": {
            "type": "boolean"
          }
        }
      },
      "Puppy": {
        "required": [
          "name",
          "breed"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "breed": {
            "type": "string"
          }
        }
      },
      "UnionIntString": {
        "anyOf": [
          {
            "type": "integer",
            "format": "int32"
          },
          {
            "type": "string"
          }
        ]
      },
      "UnionPet": {
        "type": "object",
        "anyOf": [
          {
            "$ref": "#/components/schemas/Kitten"
          },
          {
            "$ref": "#/components/schemas/Puppy"
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Test"
    }
  ]
}