Skip to content

Commit

Permalink
Merge pull request #35 from cloud-ark/more-basic-types
Browse files Browse the repository at this point in the history
Added support for more native types
  • Loading branch information
devdattakulkarni authored Dec 3, 2018
2 parents 0030900 + 78f6cb5 commit 712307a
Show file tree
Hide file tree
Showing 2 changed files with 243 additions and 266 deletions.
10 changes: 5 additions & 5 deletions pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,19 @@ func installExplainDescribePaths(discoveryServer *DiscoveryServer) {

func handleExplain(request *restful.Request, response *restful.Response) {
customResourceKind := request.QueryParameter(KIND_QUERY_PARAM)
fmt.Printf("Kind:%s\n", customResourceKind)
//fmt.Printf("Kind:%s\n", customResourceKind)

customResourceKind, queryKind := getQueryKind(customResourceKind)
fmt.Printf("Custom Resource Kind:%s\n", customResourceKind)
fmt.Printf("Query Kind:%s\n", queryKind)
//fmt.Printf("Custom Resource Kind:%s\n", customResourceKind)
//fmt.Printf("Query Kind:%s\n", queryKind)

openAPISpec := discovery.GetOpenAPISpec(customResourceKind)
fmt.Println("OpenAPI Spec:%v", openAPISpec)
//fmt.Println("OpenAPI Spec:%v", openAPISpec)

queryResponse := ""
if openAPISpec != "" {
queryResponse = parseOpenAPISpec([]byte(openAPISpec), queryKind)
fmt.Printf("Query response:%s\n", queryResponse)
//fmt.Printf("Query response:%s\n", queryResponse)
}

response.Write([]byte(queryResponse))
Expand Down
Loading

0 comments on commit 712307a

Please sign in to comment.