Update Swagger defs to OAPI3.0

pull/4649/head
Qstick 5 years ago
parent b077d1c6cf
commit 86a75e2641

@ -35,14 +35,15 @@
"summary": "Get all movies", "summary": "Get all movies",
"description": "Returns all movies", "description": "Returns all movies",
"operationId": "getMovie", "operationId": "getMovie",
"produces": [
"application/json"
],
"responses": { "responses": {
"200": { "200": {
"description": "successful operation", "description": "successful operation",
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
}
}
} }
}, },
"400": { "400": {
@ -63,29 +64,27 @@
"Movie" "Movie"
], ],
"summary": "Add new movie", "summary": "Add new movie",
"consumes": [ "requestBody": {
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Movie object that needs to be added", "description": "Movie object that needs to be added",
"required": true, "required": true,
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
} }
} }
], }
},
"responses": { "responses": {
"200": { "200": {
"description": "successful operation", "description": "successful operation",
"content": {
"application/json": {
"schema": { "schema": {
"type": "integer" "type": "integer"
} }
}
}
}, },
"405": { "405": {
"description": "Validation exception" "description": "Validation exception"
@ -102,28 +101,26 @@
"Movie" "Movie"
], ],
"summary": "Edit existing movie", "summary": "Edit existing movie",
"consumes": [ "requestBody": {
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Movie object that needs to be edited", "description": "Movie object that needs to be edited",
"required": true, "required": true,
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
} }
} }
], }
},
"responses": { "responses": {
"200": { "200": {
"description": "successful operation", "description": "successful operation",
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
}
}
} }
}, },
"404": { "404": {
@ -148,24 +145,26 @@
"summary": "Get movie by ID", "summary": "Get movie by ID",
"description": "Returns a single movie", "description": "Returns a single movie",
"operationId": "getMovieById", "operationId": "getMovieById",
"produces": [
"application/json"
],
"parameters": [ "parameters": [
{ {
"name": "movieId", "name": "movieId",
"in": "path", "in": "path",
"description": "ID of movie to return", "description": "ID of movie to return",
"required": true, "required": true,
"type": "integer", "schema": {
"format": "int64" "type": "integer"
}
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "successful operation", "description": "successful operation",
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
}
}
} }
}, },
"400": { "400": {
@ -188,28 +187,30 @@
"summary": "Deletes a Movie", "summary": "Deletes a Movie",
"description": "", "description": "",
"operationId": "deleteMovie", "operationId": "deleteMovie",
"produces": [
"application/json"
],
"parameters": [ "parameters": [
{ {
"name": "movieId", "name": "movieId",
"in": "path", "in": "path",
"description": "Movie id to delete", "description": "Movie id to delete",
"required": true, "required": true,
"type": "integer", "schema": {
"format": "int64" "type": "integer"
}
}, },
{ {
"name": "addNetImportExclusion", "name": "addNetImportExclusion",
"in": "query", "in": "query",
"schema": {
"type": "boolean" "type": "boolean"
}
}, },
{ {
"name": "deleteFiles", "name": "deleteFiles",
"in": "query", "in": "query",
"schema": {
"type": "boolean" "type": "boolean"
} }
}
], ],
"responses": { "responses": {
"400": { "400": {
@ -228,19 +229,7 @@
} }
}, },
"components": { "components": {
"securitySchemes": { "schemas": {
"api_key": {
"type": "apiKey",
"in": "query",
"name": "apiKey"
}
}
},
"externalDocs": {
"description": "GitHub",
"url": "https://github.com/Radarr/Radarr"
},
"definitions": {
"Movie": { "Movie": {
"type": "object", "type": "object",
"required": [ "required": [
@ -274,7 +263,7 @@
"images": { "images": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Image" "$ref": "#/components/schemas/Image"
} }
}, },
"website": { "website": {
@ -350,10 +339,10 @@
"type": "string" "type": "string"
}, },
"ratings": { "ratings": {
"$ref": "#/definitions/Rating" "$ref": "#/components/schemas/Rating"
}, },
"collection": { "collection": {
"$ref": "#/definitions/Collection" "$ref": "#/components/schemas/Collection"
}, },
"status": { "status": {
"type": "string", "type": "string",
@ -401,7 +390,7 @@
"images": { "images": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Image" "$ref": "#/components/schemas/Image"
} }
} }
}, },
@ -423,5 +412,17 @@
"name": "Rating" "name": "Rating"
} }
} }
},
"securitySchemes": {
"api_key": {
"type": "apiKey",
"in": "query",
"name": "apiKey"
}
}
},
"externalDocs": {
"description": "GitHub",
"url": "https://github.com/Radarr/Radarr"
} }
} }

@ -35,14 +35,15 @@
"summary": "Get all movies", "summary": "Get all movies",
"description": "Returns all movies", "description": "Returns all movies",
"operationId": "getMovie", "operationId": "getMovie",
"produces": [
"application/json"
],
"responses": { "responses": {
"200": { "200": {
"description": "successful operation", "description": "successful operation",
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
}
}
} }
}, },
"400": { "400": {
@ -63,29 +64,27 @@
"Movie" "Movie"
], ],
"summary": "Add new movie", "summary": "Add new movie",
"consumes": [ "requestBody": {
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Movie object that needs to be added", "description": "Movie object that needs to be added",
"required": true, "required": true,
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
} }
} }
], }
},
"responses": { "responses": {
"200": { "200": {
"description": "successful operation", "description": "successful operation",
"content": {
"application/json": {
"schema": { "schema": {
"type": "integer" "type": "integer"
} }
}
}
}, },
"405": { "405": {
"description": "Validation exception" "description": "Validation exception"
@ -102,28 +101,26 @@
"Movie" "Movie"
], ],
"summary": "Edit existing movie", "summary": "Edit existing movie",
"consumes": [ "requestBody": {
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Movie object that needs to be edited", "description": "Movie object that needs to be edited",
"required": true, "required": true,
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
} }
} }
], }
},
"responses": { "responses": {
"200": { "200": {
"description": "successful operation", "description": "successful operation",
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
}
}
} }
}, },
"404": { "404": {
@ -148,24 +145,26 @@
"summary": "Get movie by ID", "summary": "Get movie by ID",
"description": "Returns a single movie", "description": "Returns a single movie",
"operationId": "getMovieById", "operationId": "getMovieById",
"produces": [
"application/json"
],
"parameters": [ "parameters": [
{ {
"name": "movieId", "name": "movieId",
"in": "path", "in": "path",
"description": "ID of movie to return", "description": "ID of movie to return",
"required": true, "required": true,
"type": "integer", "schema": {
"format": "int64" "type": "integer"
}
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "successful operation", "description": "successful operation",
"content": {
"application/json": {
"schema": { "schema": {
"$ref": "#/definitions/Movie" "$ref": "#/components/schemas/Movie"
}
}
} }
}, },
"400": { "400": {
@ -188,28 +187,30 @@
"summary": "Deletes a Movie", "summary": "Deletes a Movie",
"description": "", "description": "",
"operationId": "deleteMovie", "operationId": "deleteMovie",
"produces": [
"application/json"
],
"parameters": [ "parameters": [
{ {
"name": "movieId", "name": "movieId",
"in": "path", "in": "path",
"description": "Movie id to delete", "description": "Movie id to delete",
"required": true, "required": true,
"type": "integer", "schema": {
"format": "int64" "type": "integer"
}
}, },
{ {
"name": "addNetImportExclusion", "name": "addNetImportExclusion",
"in": "query", "in": "query",
"schema": {
"type": "boolean" "type": "boolean"
}
}, },
{ {
"name": "deleteFiles", "name": "deleteFiles",
"in": "query", "in": "query",
"schema": {
"type": "boolean" "type": "boolean"
} }
}
], ],
"responses": { "responses": {
"400": { "400": {
@ -228,19 +229,7 @@
} }
}, },
"components": { "components": {
"securitySchemes": { "schemas": {
"api_key": {
"type": "apiKey",
"in": "query",
"name": "apiKey"
}
}
},
"externalDocs": {
"description": "GitHub",
"url": "https://github.com/Radarr/Radarr"
},
"definitions": {
"Movie": { "Movie": {
"type": "object", "type": "object",
"required": [ "required": [
@ -274,7 +263,7 @@
"images": { "images": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Image" "$ref": "#/components/schemas/Image"
} }
}, },
"website": { "website": {
@ -350,10 +339,10 @@
"type": "string" "type": "string"
}, },
"ratings": { "ratings": {
"$ref": "#/definitions/Rating" "$ref": "#/components/schemas/Rating"
}, },
"collection": { "collection": {
"$ref": "#/definitions/Collection" "$ref": "#/components/schemas/Collection"
}, },
"status": { "status": {
"type": "string", "type": "string",
@ -401,7 +390,7 @@
"images": { "images": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Image" "$ref": "#/components/schemas/Image"
} }
} }
}, },
@ -423,5 +412,17 @@
"name": "Rating" "name": "Rating"
} }
} }
},
"securitySchemes": {
"api_key": {
"type": "apiKey",
"in": "query",
"name": "apiKey"
}
}
},
"externalDocs": {
"description": "GitHub",
"url": "https://github.com/Radarr/Radarr"
} }
} }
Loading…
Cancel
Save