Update Swagger defs to OAPI3.0

This commit is contained in:
Qstick 2020-07-25 00:59:00 -04:00
parent b077d1c6cf
commit 86a75e2641
2 changed files with 476 additions and 474 deletions

View File

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

View File

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