Add generated openapi docs to website ()

* Add generated openapi docs to website

* Uppercase API link in navbar

* fix(docs): open api empty summary ()

* feat(docs): Use /docs/api path for swagger docs

* Sync api version to be the same as the server

* Update version

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
bo0tzz 2022-12-08 04:57:34 +01:00 committed by GitHub
parent 1adf8ff6b6
commit a97b761eda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 2787 additions and 73 deletions

View file

@ -30,8 +30,8 @@ const config = {
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
"docusaurus-preset-openapi",
/** @type {import('docusaurus-preset-openapi').Options} */
({
docs: {
showLastUpdateAuthor: true,
@ -42,6 +42,10 @@ const config = {
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/immich-app/immich/tree/main/docs/",
},
api: {
path: "../server/immich-openapi-specs.json",
routeBasePath: "/docs/api"
},
// blog: {
// showReadingTime: true,
// editUrl: "https://github.com/immich-app/immich/tree/main/docs/",
@ -80,6 +84,11 @@ const config = {
position: "right",
label: "Documentation",
},
{
to: "/docs/api",
position: "right",
label: "API"
},
{ to: "/blog", label: "Blog", position: "right" },
{
href: "https://github.com/immich-app/immich",