apidocs: re-version, set up for hosted ui

swagger.json is uploaded after each build, and is hosted at
api.jfa-go.com.
This commit is contained in:
Harvey Tindall 2021-11-15 00:17:39 +00:00
parent b39ad5c688
commit 4fcba32f74
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
3 changed files with 9 additions and 3 deletions

View File

@ -80,12 +80,15 @@ steps:
volumes: volumes:
- name: ssh_key - name: ssh_key
path: /id_rsa path: /id_rsa
- name: ssh_key2
path: /id_rsa2
commands: commands:
- curl -sL https://git.io/goreleaser > goreleaser - curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser - chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist - ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist
- wget https://builds.hrfee.pw/upload.py - wget https://builds.hrfee.pw/upload.py
- pip3 install requests - pip3 install requests
- bash -c 'sftp -i /id_rsa2 -o StrictHostKeyChecking=no root@161.97.102.153:/mnt/redoc <<< $"put docs/swagger.json jfa-go.json"'
- bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"' - bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"'
# - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "reprepro -Vb /repo remove trusty-unstable jfa-go"' # - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "reprepro -Vb /repo remove trusty-unstable jfa-go"'
# - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "reprepro -Vb /repo remove trusty-unstable jfa-go-tray"' # - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "reprepro -Vb /repo remove trusty-unstable jfa-go-tray"'
@ -99,6 +102,9 @@ volumes:
- name: ssh_key - name: ssh_key
host: host:
path: /root/.ssh/id_rsa_packaging path: /root/.ssh/id_rsa_packaging
- name: ssh_key2
host:
path: /root/.ssh/docker-build
trigger: trigger:
branch: branch:
- main - main

View File

@ -100,7 +100,7 @@ type getTokenDTO struct {
} }
// @Summary Grabs an API token using username & password. // @Summary Grabs an API token using username & password.
// @description Click the lock icon next to this, login with your normal jfa-go credentials. Click 'try it out', then 'execute' and an API Key will be returned, copy it (not including quotes). On any of the other routes, click the lock icon and set the API key as "Bearer `your api key`". // @description If viewing docs locally, click the lock icon next to this, login with your normal jfa-go credentials. Click 'try it out', then 'execute' and an API Key will be returned, copy it (not including quotes). On any of the other routes, click the lock icon and set the API key as "Bearer `your api key`".
// @Produce json // @Produce json
// @Success 200 {object} getTokenDTO // @Success 200 {object} getTokenDTO
// @Failure 401 {object} stringResponse // @Failure 401 {object} stringResponse

View File

@ -622,7 +622,7 @@ func flagPassed(name string) (found bool) {
} }
// @title jfa-go internal API // @title jfa-go internal API
// @version 0.3.6 // @version 0.3.10
// @description API for the jfa-go frontend // @description API for the jfa-go frontend
// @contact.name Harvey Tindall // @contact.name Harvey Tindall
// @contact.email hrfee@hrfee.dev // @contact.email hrfee@hrfee.dev
@ -638,7 +638,7 @@ func flagPassed(name string) (found bool) {
// @name getTokenAuth // @name getTokenAuth
// @tag.name Auth // @tag.name Auth
// @tag.description --------Get a token here first!-------- // @tag.description -Get a token here if running swagger UI locally.-
// @tag.name Users // @tag.name Users
// @tag.description Jellyfin user related operations. // @tag.description Jellyfin user related operations.