Skip to content

Commit 6712bf5

Browse files
Updated swagger
1 parent edd8631 commit 6712bf5

File tree

5 files changed

+66
-3
lines changed

5 files changed

+66
-3
lines changed

go-rest-api/docs/docs.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ const docTemplate = `{
4646
"schema": {
4747
"type": "string"
4848
}
49+
},
50+
{
51+
"description": "Git URL",
52+
"name": "Url",
53+
"in": "body",
54+
"required": true,
55+
"schema": {
56+
"type": "string"
57+
}
4958
}
5059
],
5160
"responses": {

go-rest-api/docs/swagger.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@
3737
"schema": {
3838
"type": "string"
3939
}
40+
},
41+
{
42+
"description": "Git URL",
43+
"name": "Url",
44+
"in": "body",
45+
"required": true,
46+
"schema": {
47+
"type": "string"
48+
}
4049
}
4150
],
4251
"responses": {

go-rest-api/docs/swagger.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ paths:
2222
required: true
2323
schema:
2424
type: string
25+
- description: Git URL
26+
in: body
27+
name: Url
28+
required: true
29+
schema:
30+
type: string
2531
produces:
2632
- application/json
2733
responses:

go-rest-api/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ func homeLink(c *gin.Context) {
2828
// @Description Pull a github repository down.
2929
// @Tags root
3030
// @Accept json
31+
// @Param branch body string true "Branch Name"
32+
// @Param Url body string true "Git URL"
3133
// @Produce json
32-
// @Param branch body string true "Branch Name"
3334
// @Success 200 {object} map[string]interface{}
3435
// @Router /pull [post]
3536
func gitPull(c *gin.Context) {
@@ -43,6 +44,7 @@ func gitPull(c *gin.Context) {
4344
Branch string `json:"branch" binding:"required"`
4445
}{}
4546

47+
4648
if err := c.BindJSON(&json); err == nil {
4749
// IF NO ERROR IN BINDING
4850
fmt.Printf("No error in JSON binding: URL: %s Branch: %s\n", json.Url, json.Branch)

ui3/index.html

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,44 @@
1+
<head>
2+
<title>Tetsuo VUE 3</title>
3+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css">
4+
</head>
5+
16
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
7+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.js"></script>
8+
9+
210

3-
<div id="app">{{ message }}</div>
411

5-
<script>
12+
<body>
13+
<v-card
14+
class="mx-auto"
15+
max-width="344"
16+
variant="outlined"
17+
>
18+
<v-card-item>
19+
<div>
20+
<div class="text-overline mb-1">
21+
OVERLINE
22+
</div>
23+
<div class="text-h6 mb-1">
24+
Headline
25+
</div>
26+
<div class="text-caption">Greyhound divisely hello coldly fonwderfully</div>
27+
</div>
28+
</v-card-item>
29+
30+
<v-card-actions>
31+
<v-btn variant="outlined">
32+
Button
33+
</v-btn>
34+
</v-card-actions>
35+
</v-card>
36+
37+
</body>
38+
39+
<!--
40+
<div id="app">{{ message }}</div>
41+
<script>
642
const { createApp } = Vue
743
844
createApp({
@@ -13,4 +49,5 @@
1349
}
1450
}).mount('#app')
1551
</script>
52+
-->
1653

0 commit comments

Comments
 (0)