mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Update OpenAPI documentation
This commit is contained in:
parent
55f94602d4
commit
45e24aa311
194
openapi.json
194
openapi.json
@ -2,12 +2,12 @@
|
|||||||
"openapi": "3.0.4",
|
"openapi": "3.0.4",
|
||||||
"info": {
|
"info": {
|
||||||
"title": "Kavita",
|
"title": "Kavita",
|
||||||
"description": "Kavita provides a set of APIs that are authenticated by JWT. JWT token can be copied from local storage. Assume all fields of a payload are required. Built against v0.8.6.14",
|
"description": "Kavita provides a set of APIs that are authenticated by JWT. JWT token can be copied from local storage. Assume all fields of a payload are required. Built against v0.8.6.15",
|
||||||
"license": {
|
"license": {
|
||||||
"name": "GPL-3.0",
|
"name": "GPL-3.0",
|
||||||
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
|
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
|
||||||
},
|
},
|
||||||
"version": "0.8.6.14"
|
"version": "0.8.6.15"
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
@ -2991,6 +2991,139 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/Koreader/{apiKey}/users/auth": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Koreader"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "apiKey",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/Koreader/{apiKey}/syncs/progress": {
|
||||||
|
"put": {
|
||||||
|
"tags": [
|
||||||
|
"Koreader"
|
||||||
|
],
|
||||||
|
"summary": "Syncs book progress with Kavita. Will attempt to save the underlying reader position if possible.",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "apiKey",
|
||||||
|
"in": "path",
|
||||||
|
"description": "",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"description": "",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"text/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"application/*+json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"content": {
|
||||||
|
"text/plain": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderProgressUpdateDto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderProgressUpdateDto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"text/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderProgressUpdateDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/Koreader/{apiKey}/syncs/progress/{ebookHash}": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Koreader"
|
||||||
|
],
|
||||||
|
"summary": "Gets book progress from Kavita, if not found will return a 400",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "apiKey",
|
||||||
|
"in": "path",
|
||||||
|
"description": "",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ebookHash",
|
||||||
|
"in": "path",
|
||||||
|
"description": "",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"content": {
|
||||||
|
"text/plain": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"text/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/Library/create": {
|
"/api/Library/create": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -21027,6 +21160,54 @@
|
|||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
|
"KoreaderBookDto": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"document": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "This is the Koreader hash of the book. It is used to identify the book.",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"device_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "A randomly generated id from the koreader device. Only used to maintain the Koreader interface.",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"device": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The Koreader device name. Only used to maintain the Koreader interface.",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"percentage": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Percent progress of the book. Only used to maintain the Koreader interface.",
|
||||||
|
"format": "float"
|
||||||
|
},
|
||||||
|
"progress": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "An XPath string read by Koreader to determine the location within the epub.\nEssentially, it is Koreader's equivalent to ProgressDto.BookScrollId.",
|
||||||
|
"nullable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "This is the interface for receiving and sending updates to Koreader. The only fields\nthat are actually used are the Document and Progress fields."
|
||||||
|
},
|
||||||
|
"KoreaderProgressUpdateDto": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"document": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "This is the Koreader hash of the book. It is used to identify the book.",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"timestamp": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "UTC Timestamp to return to KOReader",
|
||||||
|
"format": "date-time"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
"LanguageDto": {
|
"LanguageDto": {
|
||||||
"required": [
|
"required": [
|
||||||
"isoCode",
|
"isoCode",
|
||||||
@ -21522,6 +21703,11 @@
|
|||||||
"description": "Absolute path to the archive file",
|
"description": "Absolute path to the archive file",
|
||||||
"nullable": true
|
"nullable": true
|
||||||
},
|
},
|
||||||
|
"koreaderHash": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "A hash of the document using Koreader's unique hashing algorithm",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
"pages": {
|
"pages": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "Number of pages for the given file",
|
"description": "Number of pages for the given file",
|
||||||
@ -27661,6 +27847,10 @@
|
|||||||
"name": "Image",
|
"name": "Image",
|
||||||
"description": "Responsible for servicing up images stored in Kavita for entities"
|
"description": "Responsible for servicing up images stored in Kavita for entities"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Koreader",
|
||||||
|
"description": "The endpoint to interface with Koreader's Progress Sync plugin."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Manage",
|
"name": "Manage",
|
||||||
"description": "All things centered around Managing the Kavita instance, that isn't aligned with an entity"
|
"description": "All things centered around Managing the Kavita instance, that isn't aligned with an entity"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user