{
"openapi": "3.0.3",
"info": {
"title": "test",
"version": "3.5.0"
},
"paths": {
"/datagoeshere": {
"put": {
"tags": [
"it"
],
"operationId": "handler7",
"requestBody": {
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/dup1": {
"get": {
"tags": [
"it"
],
"operationId": "handler8",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NeverDuplicatedResponseTopLevel"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/dup2": {
"get": {
"tags": [
"it"
],
"operationId": "handler9",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NeverDuplicatedResponseTopLevel"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/dup5": {
"put": {
"tags": [
"it"
],
"operationId": "handler10",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NeverDuplicatedBodyTopLevel"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/dup6": {
"put": {
"tags": [
"it"
],
"operationId": "handler11",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NeverDuplicatedBodyTopLevel"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/dup7": {
"put": {
"tags": [
"it"
],
"operationId": "handler12",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NeverDuplicatedTop"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/dup8": {
"get": {
"tags": [
"it"
],
"operationId": "handler13",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NeverDuplicatedTop"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/first_thing": {
"get": {
"tags": [
"it"
],
"operationId": "vzeroupper",
"responses": {
"201": {
"description": "successful creation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/flattened": {
"get": {
"tags": [
"it"
],
"operationId": "big_flat",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CoolStruct"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/impairment": {
"get": {
"tags": [
"it"
],
"operationId": "handler6",
"parameters": [
{
"in": "query",
"name": "a_mandatory_string",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "a_number",
"schema": {
"type": "integer",
"format": "uint16",
"minimum": 0
}
},
{
"in": "query",
"name": "limit",
"description": "Maximum number of items returned by a single call",
"schema": {
"nullable": true,
"type": "integer",
"format": "uint32",
"minimum": 1
}
},
{
"in": "query",
"name": "page_token",
"description": "Token returned by previous call to retrieve the subsequent page",
"schema": {
"nullable": true,
"type": "string"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseItemResultsPage"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
},
"x-dropshot-pagination": {
"required": [
"a_mandatory_string"
]
}
}
},
"/other_thing": {
"get": {
"tags": [
"it"
],
"operationId": "vzerolower",
"responses": {
"101": {
"description": "Negotiating protocol upgrade from HTTP/1.1 to WebSocket"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
},
"x-dropshot-websocket": {}
}
},
"/playing/a/bit/nicer": {
"get": {
"tags": [
"it"
],
"operationId": "handler18",
"responses": {
"200": {
"description": "successful operation",
"content": {
"*/*": {
"schema": {}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/302_found": {
"get": {
"tags": [
"it"
],
"operationId": "handler21",
"responses": {
"302": {
"description": "redirect (found)",
"headers": {
"location": {
"description": "HTTP \"Location\" header",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/303_see_other": {
"get": {
"tags": [
"it"
],
"operationId": "handler22",
"responses": {
"303": {
"description": "redirect (see other)",
"headers": {
"location": {
"description": "HTTP \"Location\" header",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/307_temporary_redirect": {
"get": {
"tags": [
"it"
],
"operationId": "handler23",
"responses": {
"307": {
"description": "redirect (temporary redirect)",
"headers": {
"location": {
"description": "HTTP \"Location\" header",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/camera": {
"post": {
"tags": [
"it"
],
"operationId": "handler4",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BodyParam"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "successful creation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/deprecated": {
"get": {
"tags": [
"it"
],
"operationId": "handler24",
"responses": {
"307": {
"description": "redirect (temporary redirect)",
"headers": {
"location": {
"description": "HTTP \"Location\" header",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
},
"deprecated": true
}
},
"/test/man/{x}": {
"delete": {
"tags": [
"it"
],
"operationId": "handler3",
"parameters": [
{
"in": "path",
"name": "x",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "successful deletion"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/multipart-form-data": {
"post": {
"tags": [
"it"
],
"operationId": "handler25",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "string",
"format": "binary"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "successful creation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/person": {
"get": {
"tags": [
"it"
],
"summary": "Rust style comment",
"description": "This is a multi-line comment.",
"operationId": "handler1",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"title": "Null",
"type": "string",
"enum": [
null
]
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/tv/{x}": {
"post": {
"tags": [
"person",
"woman",
"man",
"camera",
"tv"
],
"operationId": "handler5",
"parameters": [
{
"in": "path",
"name": "x",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "tomax",
"description": "One brother connected by the pain",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "xamot",
"description": "Spoiler: there's a reason this is not required...",
"schema": {
"nullable": true,
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BodyParam"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "successfully enqueued operation",
"content": {
"application/json": {
"schema": {
"title": "Null",
"type": "string",
"enum": [
null
]
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/urlencoded": {
"post": {
"tags": [
"it"
],
"operationId": "handler20",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/BodyParam"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "successful creation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/test/woman": {
"put": {
"tags": [
"it"
],
"summary": "C-style comment",
"description": "This is a multi-line comment.",
"operationId": "handler2",
"parameters": [
{
"in": "query",
"name": "tomax",
"description": "One brother connected by the pain",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "xamot",
"description": "Spoiler: there's a reason this is not required...",
"schema": {
"nullable": true,
"type": "string"
}
}
],
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/testing/{aa}": {
"get": {
"tags": [
"it"
],
"operationId": "handler31",
"parameters": [
{
"in": "path",
"name": "aa",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "header",
"name": "header_a",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "query_a",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CoolStruct"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/testing/{aa}/{bb}": {
"put": {
"tags": [
"it"
],
"operationId": "handler30",
"parameters": [
{
"in": "path",
"name": "aa",
"required": true,
"schema": {
"$ref": "#/components/schemas/WithXRustTypeForXRustAParam"
}
},
{
"in": "path",
"name": "bb",
"required": true,
"schema": {
"$ref": "#/components/schemas/WithXRustTypeForXRustBParam"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CoolStruct"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/testing32/{aa}": {
"get": {
"tags": [
"it"
],
"operationId": "handler32",
"parameters": [
{
"in": "path",
"name": "aa",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "header",
"name": "header_a",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "query_a",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CoolStruct"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/thing_with_headers": {
"get": {
"tags": [
"it"
],
"operationId": "hparam",
"parameters": [
{
"in": "header",
"name": "a",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "header",
"name": "b",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "resource updated"
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/too/smart/for/my/own/good": {
"get": {
"tags": [
"it"
],
"operationId": "handler16",
"responses": {
"default": {
"description": "",
"content": {
"*/*": {
"schema": {}
}
}
}
}
}
},
"/unit_please": {
"get": {
"tags": [
"it"
],
"operationId": "handler15",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"title": "Null",
"type": "string",
"enum": [
null
]
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/with/example": {
"get": {
"tags": [
"it"
],
"operationId": "handler19",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ObjectWithExample"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/with/headers": {
"get": {
"tags": [
"it"
],
"operationId": "handler17",
"responses": {
"204": {
"description": "resource updated",
"headers": {
"Etag": {
"description": "eee! a tag",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
},
"x-foo-mobile": {
"description": "this is a foo that is non-required",
"style": "simple",
"schema": {
"$ref": "#/components/schemas/Foo"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
}
},
"components": {
"schemas": {
"BodyParam": {
"type": "object",
"properties": {
"answer": {
"default": 42,
"type": "integer",
"format": "int32"
},
"any": {},
"maybe": {
"default": false,
"type": "boolean"
},
"nested": {
"default": {
"maybe": false
},
"allOf": [
{
"$ref": "#/components/schemas/BodyParamNested"
}
]
},
"things": {
"default": [],
"type": "array",
"items": {
"type": "integer",
"format": "uint32",
"minimum": 0
}
},
"x": {
"type": "string"
}
},
"required": [
"any",
"x"
]
},
"BodyParamNested": {
"type": "object",
"properties": {
"maybe": {
"nullable": true,
"type": "boolean"
}
}
},
"CoolStruct": {
"type": "object",
"properties": {
"another_thing": {
"type": "integer",
"format": "uint16",
"minimum": 0
}
},
"required": [
"another_thing"
],
"oneOf": [
{
"type": "object",
"properties": {
"thing_one": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Foo"
]
}
},
"required": [
"thing_one",
"type"
]
},
{
"type": "object",
"properties": {
"thing_one": {
"type": "string"
},
"thing_two": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Bar"
]
}
},
"required": [
"thing_one",
"thing_two",
"type"
]
}
]
},
"Error": {
"description": "Error information from a response.",
"type": "object",
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"request_id": {
"type": "string"
}
},
"required": [
"message",
"request_id"
]
},
"NestedObjectWithExample": {
"example": {
"nick_name": "baz"
},
"type": "object",
"properties": {
"nick_name": {
"type": "string"
}
},
"required": [
"nick_name"
]
},
"NeverDuplicatedBodyNextLevel": {
"type": "object",
"properties": {
"v": {
"type": "boolean"
}
},
"required": [
"v"
]
},
"NeverDuplicatedBodyTopLevel": {
"type": "object",
"properties": {
"_b": {
"$ref": "#/components/schemas/NeverDuplicatedBodyNextLevel"
}
},
"required": [
"_b"
]
},
"NeverDuplicatedNext": {
"type": "object",
"properties": {
"v": {
"type": "boolean"
}
},
"required": [
"v"
]
},
"NeverDuplicatedResponseNextLevel": {
"description": "Veritably non-duplicated type",
"type": "object",
"properties": {
"v": {
"description": "Vee",
"type": "boolean"
}
},
"required": [
"v"
]
},
"NeverDuplicatedResponseTopLevel": {
"description": "Best non-duplicated type",
"type": "object",
"properties": {
"b": {
"description": "Bee",
"allOf": [
{
"$ref": "#/components/schemas/NeverDuplicatedResponseNextLevel"
}
]
}
},
"required": [
"b"
]
},
"NeverDuplicatedTop": {
"type": "object",
"properties": {
"b": {
"$ref": "#/components/schemas/NeverDuplicatedNext"
}
},
"required": [
"b"
]
},
"ObjectWithExample": {
"example": {
"id": 456,
"name": "foo bar",
"nested": {
"nick_name": "baz"
}
},
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "uint32",
"minimum": 0
},
"name": {
"type": "string"
},
"nested": {
"$ref": "#/components/schemas/NestedObjectWithExample"
}
},
"required": [
"id",
"name",
"nested"
]
},
"Response": {
"type": "object"
},
"ResponseItem": {
"type": "object",
"properties": {
"word": {
"type": "string"
}
},
"required": [
"word"
]
},
"ResponseItemResultsPage": {
"description": "A single page of results",
"type": "object",
"properties": {
"items": {
"description": "list of items on this page of results",
"type": "array",
"items": {
"$ref": "#/components/schemas/ResponseItem"
}
},
"next_page": {
"nullable": true,
"description": "token used to fetch the next page of results (if any)",
"type": "string"
}
},
"required": [
"items"
]
},
"WithXRustTypeForXRustAParam": {
"x-rust-type": {
"crate": "foo",
"parameters": [
{
"$ref": "#/components/schemas/XRustAParam"
}
],
"path": "foo",
"version": "*"
},
"type": "string"
},
"WithXRustTypeForXRustBParam": {
"x-rust-type": {
"crate": "foo",
"parameters": [
{
"$ref": "#/components/schemas/XRustBParam"
}
],
"path": "foo",
"version": "*"
},
"type": "string"
},
"XRustAParam": {
"type": "object",
"properties": {
"data": {
"type": "string"
}
},
"required": [
"data"
]
},
"XRustBParam": {
"not": {}
},
"Foo": {
"type": "string"
}
},
"responses": {
"Error": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"tags": [
{
"name": "camera"
},
{
"name": "it"
},
{
"name": "man"
},
{
"name": "person"
},
{
"name": "tv"
},
{
"name": "woman"
}
]
}