mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update api v1 docs (#2117)
* chore: update apiv1 docs * chore: update
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# This file is used by generate-api-documentation.ps1 and generate-api-documentation.sh
|
||||
# This file is used by gen-api-v1-docs.ps1 and gen-api-v1-docs.sh
|
||||
|
||||
# You should list aditional dirs here if the API grows
|
||||
SWAG_API_DIRS=./api/v1
|
||||
@@ -10,4 +10,4 @@ SWAG_GENERAL_INFO=./server/server.go
|
||||
SWAG_OUTPUT_TYPES=go,yaml
|
||||
|
||||
# Where generated files are outputted
|
||||
SWAG_OUTPUT=./api
|
||||
SWAG_OUTPUT=./api/v1
|
@@ -7,10 +7,10 @@
|
||||
# Requirements:
|
||||
# * go
|
||||
|
||||
# swag is configured mainly via generate-api-documentation.cfg file.
|
||||
# swag is configured mainly via gen-api-v1-docs.cfg file.
|
||||
|
||||
# Usage:
|
||||
# ./scripts/generate-api-documentation.ps1
|
||||
# ./scripts/gen-api-v1-docs.ps1
|
||||
|
||||
foreach ($dir in @(".", "../")) {
|
||||
if (Test-Path (Join-Path $dir ".gitignore")) {
|
||||
@@ -20,8 +20,8 @@ foreach ($dir in @(".", "../")) {
|
||||
}
|
||||
Set-Location $repoRoot
|
||||
|
||||
Write-Host "Parsing generate-api-documentation.cfg..."
|
||||
foreach ($line in (Get-Content "$repoRoot\scripts\generate-api-documentation.cfg" )) {
|
||||
Write-Host "Parsing gen-api-v1-docs.cfg..."
|
||||
foreach ($line in (Get-Content "$repoRoot\scripts\gen-api-v1-docs.cfg" )) {
|
||||
if ($line.Trim().StartsWith('#')) {
|
||||
continue
|
||||
}
|
@@ -9,11 +9,11 @@
|
||||
# Requirements:
|
||||
# * go
|
||||
|
||||
# swag is configured via generate-api-documentation.cfg file.
|
||||
# swag is configured via gen-api-v1-docs.cfg file.
|
||||
|
||||
# Usage:
|
||||
# chmod +x ./scripts/generate-api-documentation.sh
|
||||
# ./scripts/generate-api-documentation.sh
|
||||
# chmod +x ./scripts/gen-api-v1-docs.sh
|
||||
# ./scripts/gen-api-v1-docs.sh
|
||||
|
||||
find_repo_root() {
|
||||
# Usage: find_repo_root <file_at_root> <dir1> <dir2> ...
|
||||
@@ -59,8 +59,8 @@ else
|
||||
fi
|
||||
cd $repo_root
|
||||
|
||||
echo "Parsing generate-api-documentation.cfg..."
|
||||
source "$repo_root/scripts/generate-api-documentation.cfg"
|
||||
echo "Parsing gen-api-v1-docs.cfg..."
|
||||
source "$repo_root/scripts/gen-api-v1-docs.cfg"
|
||||
|
||||
echo -e "API directories: \033[0;34m$SWAG_API_DIRS\033[0m"
|
||||
echo -e "Output directory: \033[0;34m$SWAG_OUTPUT\033[0m"
|
Reference in New Issue
Block a user