oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

StrictServer but access to gin context still

Open manuelarte opened this issue 6 months ago • 0 comments

Hi,

I am using Gin, and I also want to use the strict-server option, but in some of my endpoints I still need the gin context.

For example, I want to set some cookies or store a session.

// Examples
ctx.SetCookie("csrf", uuid.New().String(), int(hourTime),
		fmt.Sprintf("/posts/%d/comments", postID), "localhost", false, true)

// or
session := sessions.Default(ctx)

Is there any option to "change" the first parameter from the normal context to a gin.context?

manuelarte avatar Aug 11 '25 21:08 manuelarte