oapi-codegen
oapi-codegen copied to clipboard
Gin StrictServer mode generate code with the standard context library
When using gin server, StrictServer mode generates StrictServerInterface with standard context. This force user to edit the generated file or user has to drop all the gin context features. Following is an example generated with gin strict server.
// StrictServerInterface represents all server handlers.
type StrictServerInterface interface {
// liveness probe
// (GET /live)
Liveness(ctx context.Context, request LivenessRequestObject) (LivenessResponseObject, error)
// readiness probe
// (GET /ready)
Readiness(ctx context.Context, request ReadinessRequestObject) (ReadinessResponseObject, error)
}