File tree Expand file tree Collapse file tree 5 files changed +63
-63
lines changed
Expand file tree Collapse file tree 5 files changed +63
-63
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,29 @@ const docTemplate = `{
109109 "200": {
110110 "description": "OK",
111111 "schema": {
112- "$ref": "#/definitions/versionInfo "
112+ "$ref": "#/definitions/VersionInfo "
113113 }
114114 }
115115 }
116116 }
117117 }
118118 },
119119 "definitions": {
120+ "VersionInfo": {
121+ "type": "object",
122+ "properties": {
123+ "config": {
124+ "type": "object",
125+ "additionalProperties": {
126+ "type": "string"
127+ }
128+ },
129+ "version": {
130+ "type": "string",
131+ "example": "0.0.0"
132+ }
133+ }
134+ },
120135 "requestStatus200": {
121136 "type": "object",
122137 "properties": {
@@ -283,21 +298,6 @@ const docTemplate = `{
283298 "example": "s3://my-bucket/my-key"
284299 }
285300 }
286- },
287- "versionInfo": {
288- "type": "object",
289- "properties": {
290- "config": {
291- "type": "object",
292- "additionalProperties": {
293- "type": "string"
294- }
295- },
296- "version": {
297- "type": "string",
298- "example": "0.0.0"
299- }
300- }
301301 }
302302 }
303303}`
Original file line number Diff line number Diff line change 100100 "200" : {
101101 "description" : " OK" ,
102102 "schema" : {
103- "$ref" : " #/definitions/versionInfo "
103+ "$ref" : " #/definitions/VersionInfo "
104104 }
105105 }
106106 }
107107 }
108108 }
109109 },
110110 "definitions" : {
111+ "VersionInfo" : {
112+ "type" : " object" ,
113+ "properties" : {
114+ "config" : {
115+ "type" : " object" ,
116+ "additionalProperties" : {
117+ "type" : " string"
118+ }
119+ },
120+ "version" : {
121+ "type" : " string" ,
122+ "example" : " 0.0.0"
123+ }
124+ }
125+ },
111126 "requestStatus200" : {
112127 "type" : " object" ,
113128 "properties" : {
274289 "example" : " s3://my-bucket/my-key"
275290 }
276291 }
277- },
278- "versionInfo" : {
279- "type" : " object" ,
280- "properties" : {
281- "config" : {
282- "type" : " object" ,
283- "additionalProperties" : {
284- "type" : " string"
285- }
286- },
287- "version" : {
288- "type" : " string" ,
289- "example" : " 0.0.0"
290- }
291- }
292292 }
293293 }
294294}
Original file line number Diff line number Diff line change @@ -161,6 +161,22 @@ Status: Gateway Timeout
161161
162162## Models
163163
164+ ### <span id =" version-info " ></span > VersionInfo
165+
166+
167+
168+
169+
170+
171+ ** Properties**
172+
173+ | Name | Type | Go type | Required | Default | Description | Example |
174+ | ------| ------| ---------| :--------:| ------- | -------------| ---------|
175+ | config | map of string| ` map[string]string ` | | | | |
176+ | version | string| ` string ` | | | | ` 0.0.0 ` |
177+
178+
179+
164180### <span id =" request-status200 " ></span > requestStatus200
165181
166182
@@ -313,19 +329,3 @@ Status: Gateway Timeout
313329| uri | string| ` string ` | | | | ` s3://my-bucket/my-key ` |
314330
315331
316-
317- ### <span id =" version-info " ></span > versionInfo
318-
319-
320-
321-
322-
323-
324- ** Properties**
325-
326- | Name | Type | Go type | Required | Default | Description | Example |
327- | ------| ------| ---------| :--------:| ------- | -------------| ---------|
328- | config | map of string| ` map[string]string ` | | | | |
329- | version | string| ` string ` | | | | ` 0.0.0 ` |
330-
331-
Original file line number Diff line number Diff line change 11definitions :
2+ VersionInfo :
3+ properties :
4+ config :
5+ additionalProperties :
6+ type : string
7+ type : object
8+ version :
9+ example : 0.0.0
10+ type : string
11+ type : object
212 requestStatus200 :
313 properties :
414 code :
@@ -119,16 +129,6 @@ definitions:
119129 example : s3://my-bucket/my-key
120130 type : string
121131 type : object
122- versionInfo :
123- properties :
124- config :
125- additionalProperties :
126- type : string
127- type : object
128- version :
129- example : 0.0.0
130- type : string
131- type : object
132132info :
133133 contact :
134134 name : Support
@@ -196,7 +196,7 @@ paths:
196196 " 200 " :
197197 description : OK
198198 schema :
199- $ref : ' #/definitions/versionInfo '
199+ $ref : ' #/definitions/VersionInfo '
200200 summary : report service version and configuration
201201 tags :
202202 - version
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ type VersionHandler struct {
1111 conf * conf.S3ndConf
1212}
1313
14- type versionInfo struct {
14+ type VersionInfo struct {
1515 Version string `json:"version" example:"0.0.0"`
1616 Config map [string ]string `json:"config,omitempty"`
17- } // @name versionInfo
17+ } // @name VersionInfo
1818
1919func NewHandler (conf * conf.S3ndConf ) * VersionHandler {
2020 return & VersionHandler {conf : conf }
@@ -23,10 +23,10 @@ func NewHandler(conf *conf.S3ndConf) *VersionHandler {
2323// @summary report service version and configuration
2424// @tags version
2525// @produce json
26- // @success 200 {object} versionInfo
26+ // @success 200 {object} VersionInfo
2727// @router /version [get]
2828func (h * VersionHandler ) ServeHTTP (w http.ResponseWriter , r * http.Request ) {
29- info := & versionInfo {
29+ info := & VersionInfo {
3030 Version : Version ,
3131 Config : h .conf .ToMap (),
3232 }
You can’t perform that action at this time.
0 commit comments