Skip to content

Commit

Permalink
Merge pull request #103 from kaleido-io/add-request-time-in-swagger
Browse files Browse the repository at this point in the history
adding default request timeout in the generated swagger doc
  • Loading branch information
nguyer authored Dec 20, 2023
2 parents c982c2b + 8c26438 commit 66e6593
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/fftm/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func (m *manager) router(metricsEnabled bool) *mux.Router {
swaggerGen := ffapi.NewSwaggerGen(&ffapi.Options{
BaseURL: u.String(),
PanicOnMissingDescription: testDescriptions,
DefaultRequestTimeout: config.GetDuration(tmconfig.APIDefaultRequestTimeout),
})
doc := swaggerGen.Generate(req.Context(), routes)
res.Header().Add("Content-Type", "application/x-yaml")
Expand All @@ -66,7 +67,9 @@ func (m *manager) router(metricsEnabled bool) *mux.Router {
u := req.URL
u.Path = ""
swaggerGen := ffapi.NewSwaggerGen(&ffapi.Options{
BaseURL: u.String(),
BaseURL: u.String(),
PanicOnMissingDescription: testDescriptions,
DefaultRequestTimeout: config.GetDuration(tmconfig.APIDefaultRequestTimeout),
})
doc := swaggerGen.Generate(req.Context(), routes)
res.Header().Add("Content-Type", "application/json")
Expand Down

0 comments on commit 66e6593

Please sign in to comment.