Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientRequestLogger ¶ added in v0.0.3
func SpecHandler ¶
func SpecHandler(prov SpecFileProvider) func(w http.ResponseWriter, r *http.Request)
SpecHandler is http handler that serves openapi spec embedded into application. common use of this handler is something like:
r := mux.NewRouter()
r.HandleFunc("/spec/opeanapi.v1.json", openapi.SpecHandler(api.PathToRawSpec))
Types ¶
type HttpRequestDoer ¶ added in v0.0.3
func ClientResponseLogger ¶ added in v0.0.3
func ClientResponseLogger(d HttpRequestDoer, l *slog.Logger) HttpRequestDoer
type SpecFileProvider ¶
SpecFileProvider is function similar to PathToRawSpec generated by oapi-codegen see https://github.com/oapi-codegen/oapi-codegen/blob/bdc4edce7476be0791dc670d695fd78378e0e9b6/pkg/codegen/templates/inline.tmpl#L38
Click to show internal directories.
Click to hide internal directories.