Add zip_path to API document, add path property

This commit is contained in:
Leeingnyo 2022-06-04 00:18:45 +09:00
parent 39a331c879
commit 8e4bb995d3
2 changed files with 2 additions and 1 deletions

View File

@ -49,6 +49,7 @@ abstract class Entry
json.field "err_msg", err_msg json.field "err_msg", err_msg
end end
json.field "zip_path", path # for API backward compatability json.field "zip_path", path # for API backward compatability
json.field "path", path
json.field "title_id", @book.id json.field "title_id", @book.id
json.field "title_title", @book.title json.field "title_title", @book.title
json.field "sort_title", sort_title json.field "sort_title", sort_title

View File

@ -40,7 +40,7 @@ struct APIRouter
Koa.schema "entry", { Koa.schema "entry", {
"pages" => Int32, "pages" => Int32,
"mtime" => Int64, "mtime" => Int64,
}.merge(s %w(path title size id title_id display_name cover_url)), }.merge(s %w(zip_path path title size id title_id display_name cover_url)),
desc: "An entry in a book" desc: "An entry in a book"
Koa.schema "title", { Koa.schema "title", {