Skip to content

Commit

Permalink
Move openapi-spec to api folder
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Jun 20, 2018
1 parent 82ed4e0 commit c17388e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "stash-server",
"title": "Searchlight",
"contact": {
"name": "AppsCode Inc.",
"url": "https://appscode.com",
Expand All @@ -11,7 +11,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "v0"
"version": "v7.0.0"
},
"paths": {
"/apis/": {
Expand Down
11 changes: 8 additions & 3 deletions hack/gencrd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/kube-openapi/pkg/common"
"path/filepath"
)

func generateCRDDefinitions() {
Expand Down Expand Up @@ -60,8 +61,8 @@ func generateSwaggerJson() {
Scheme: Scheme,
Codecs: Codecs,
Info: spec.InfoProps{
Title: "stash-server",
Version: "v0",
Title: "Searchlight",
Version: "v7.0.0",
Contact: &spec.ContactInfo{
Name: "AppsCode Inc.",
URL: "https://appscode.com",
Expand Down Expand Up @@ -91,7 +92,11 @@ func generateSwaggerJson() {
glog.Fatal(err)
}

filename := gort.GOPath() + "/src/github.com/appscode/searchlight/openapi-spec/v2/swagger.json"
filename := gort.GOPath() + "/src/github.com/appscode/searchlight/api/openapi-spec/swagger.json"
err = os.MkdirAll(filepath.Dir(filename), 0755)
if err != nil {
glog.Fatal(err)
}
err = ioutil.WriteFile(filename, []byte(apispec), 0644)
if err != nil {
glog.Fatal(err)
Expand Down

0 comments on commit c17388e

Please sign in to comment.