Skip to content

Commit 4ab423c

Browse files
authored
Fix docs (#66)
* typo in doc * kinda fixed path
1 parent b9a4324 commit 4ab423c

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

MyMusicBoxApi/docs/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const docTemplate = `{
1515
"host": "{{.Host}}",
1616
"basePath": "{{.BasePath}}",
1717
"paths": {
18-
"/api/v1/download:sourceId": {
18+
"/api/v1/download": {
1919
"get": {
2020
"description": "Enables playback for song/file using http 206 partial content",
2121
"produces": [

MyMusicBoxApi/docs/swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"basePath": "/api/v1",
99
"paths": {
10-
"/api/v1/download:sourceId": {
10+
"/api/v1/download": {
1111
"get": {
1212
"description": "Enables playback for song/file using http 206 partial content",
1313
"produces": [

MyMusicBoxApi/docs/swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ info:
5252
title: MusicBoxApi API
5353
version: "1.0"
5454
paths:
55-
/api/v1/download:sourceId:
55+
/api/v1/download:
5656
get:
5757
description: Enables playback for song/file using http 206 partial content
5858
parameters:

MyMusicBoxApi/generate_docs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/bin/bash
22

3-
# need to fix gopath...
4-
sudo /root/go/bin/swag init
3+
# yml to readme
4+
# https://swagger-markdown-ui.netlify.app/
5+
6+
# works for me
7+
sudo $HOME/go/bin/swag init

MyMusicBoxApi/http/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
// @Success 200 "serve song/file with range request (http 206)"
1717
// @Success 0 {object} models.DownloadRequestModel
1818
// @Failure 500 {object} models.ApiResponseModel
19-
// @Router /api/v1/download:sourceId [get]
19+
// @Router /api/v1/download [get]
2020
func DownloadRequest(ctx *gin.Context) {
2121
var request models.DownloadRequestModel
2222
err := ctx.ShouldBindBodyWithJSON(&request)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This project aims to create not just a music player but a universal music search
1313
## Version: 1.0
1414

1515

16-
### /api/v1/download:sourceId
16+
### /api/v1/download
1717

1818
#### GET
1919
##### Description:

0 commit comments

Comments
 (0)