Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
4ee799e1
Commit
4ee799e1
authored
Aug 10, 2015
by
nikhiljindal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing swagger spec
parent
e7d44261
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
v1.json
api/swagger-spec/v1.json
+2
-2
api_installer.go
pkg/apiserver/api_installer.go
+7
-3
No files found.
api/swagger-spec/v1.json
View file @
4ee799e1
...
...
@@ -5909,7 +5909,7 @@
"allowMultiple"
:
false
},
{
"type"
:
""
,
"type"
:
"
string
"
,
"paramType"
:
"query"
,
"name"
:
"command"
,
"description"
:
"Command is the remote command to execute. argv array. Not executed within a shell."
,
...
...
@@ -5987,7 +5987,7 @@
"allowMultiple"
:
false
},
{
"type"
:
""
,
"type"
:
"
string
"
,
"paramType"
:
"query"
,
"name"
:
"command"
,
"description"
:
"Command is the remote command to execute. argv array. Not executed within a shell."
,
...
...
pkg/apiserver/api_installer.go
View file @
4ee799e1
...
...
@@ -807,7 +807,7 @@ func addObjectParams(ws *restful.WebService, route *restful.RouteBuilder, obj in
if
docable
,
ok
:=
obj
.
(
documentable
);
ok
{
desc
=
docable
.
SwaggerDoc
()[
jsonName
]
}
route
.
Param
(
ws
.
QueryParameter
(
jsonName
,
desc
)
.
DataType
(
typeToJSON
(
sf
.
Type
.
Name
())))
route
.
Param
(
ws
.
QueryParameter
(
jsonName
,
desc
)
.
DataType
(
typeToJSON
(
sf
.
Type
.
String
())))
}
}
}
...
...
@@ -822,12 +822,16 @@ func typeToJSON(typeName string) string {
return
"boolean"
case
"uint8"
,
"int"
,
"int32"
,
"int64"
,
"uint32"
,
"uint64"
:
return
"integer"
case
"byte"
:
return
"string"
case
"float64"
,
"float32"
:
return
"number"
case
"unversioned.Time"
:
return
"string"
case
"byte"
:
return
"string"
case
"[]string"
:
// TODO: Fix this when go-restful supports a way to specify an array query param:
// https://github.com/emicklei/go-restful/issues/225
return
"string"
default
:
return
typeName
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment