File tree 2 files changed +2
-12
lines changed
2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change 1
1
package restfulspec
2
2
3
3
import (
4
- "net/http"
5
4
"reflect"
6
5
7
6
restful "github.com/emicklei/go-restful"
@@ -20,16 +19,10 @@ type Config struct {
20
19
// WebServicesURL is the url where the services are available, e.g. http://localhost:8080
21
20
// if left empty then the basePath of Swagger is taken from the actual request
22
21
WebServicesURL string
23
- // APIPath is the path where the JSON api is avaiable , e.g. /apidocs
22
+ // APIPath is the path where the JSON api is avaiable , e.g. /apidocs.json
24
23
APIPath string
25
- // SwaggerPath [optional] where the swagger UI will be served, e.g. /swagger
26
- SwaggerPath string
27
- // SwaggerFilePath [optional] is the location of folder containing Swagger HTML5 application index.html
28
- SwaggerFilePath string
29
24
// api listing is constructed from this list of restful WebServices.
30
25
WebServices []* restful.WebService
31
- // will serve all static content (scripts,pages,images)
32
- StaticHandler http.Handler
33
26
// [optional] on default CORS (Cross-Origin-Resource-Sharing) is enabled.
34
27
DisableCORS bool
35
28
// Top-level API version. Is reflected in the resource listing.
Original file line number Diff line number Diff line change @@ -136,10 +136,7 @@ func main() {
136
136
},
137
137
Version : "1.0.0" ,
138
138
},
139
- },
140
- // Optionally, specifiy where the Swagger UI is located
141
- SwaggerPath : "/apidocs/" ,
142
- SwaggerFilePath : "/Users/emicklei/Projects/swagger-ui/dist" }
139
+ }}
143
140
restfulspec .RegisterOpenAPIService (config , restful .DefaultContainer )
144
141
145
142
log .Printf ("start listening on localhost:8080" )
You can’t perform that action at this time.
0 commit comments