Skip to content

Commit 59cf964

Browse files
committed
fix some swagger docu issues
1 parent e1ce404 commit 59cf964

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed

routers/api/v1/repo/action.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ func (a ActionWorkflow) EnableWorkflow(ctx *context.APIContext) {
885885

886886
// GetArtifacts Lists all artifacts for a repository.
887887
func GetArtifactsOfRun(ctx *context.APIContext) {
888-
// swagger:operation GET /repos/{owner}/{repo}/actions/artifacts repository getArtifactsOfRun
888+
// swagger:operation GET /repos/{owner}/{repo}/actions/runs/{run}/artifacts repository getArtifactsOfRun
889889
// ---
890890
// summary: Lists all artifacts for a repository run
891891
// produces:
@@ -901,6 +901,16 @@ func GetArtifactsOfRun(ctx *context.APIContext) {
901901
// description: name of the repository
902902
// type: string
903903
// required: true
904+
// - name: run
905+
// in: path
906+
// description: runid of the workflow run
907+
// type: integer
908+
// required: true
909+
// - name: name
910+
// in: query
911+
// description: name of the artifact
912+
// type: string
913+
// required: false
904914
// responses:
905915
// "200":
906916
// "$ref": "#/responses/ArtifactsList"
@@ -962,6 +972,11 @@ func GetArtifacts(ctx *context.APIContext) {
962972
// description: name of the repository
963973
// type: string
964974
// required: true
975+
// - name: name
976+
// in: query
977+
// description: name of the artifact
978+
// type: string
979+
// required: false
965980
// responses:
966981
// "200":
967982
// "$ref": "#/responses/ArtifactsList"

templates/swagger/v1_json.tmpl

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)