Closed Tomelin closed 9 months ago
I found this option for enable in struct:
Take a note of key-value swaggerignore:”true”. This would help to hide those parameters which we don’t need in UI.
My struct looks like this:
type Name struct {
Id *int `json:"id" binding:"required"swaggerignore:"true"`
Name *string `json:"name" binding:"required"`
Code *string `json:"code" binding:"required,min=3"`
}
Hi,
I'm using gin-swagger and I created my swagger scope this format:
// NamingPost godoc // @Summary post all register in name API // @Tags naming // @Accept json // @Produce json // @Description post all register in name API // @Success 200 {object} []domain.Name // @Failure 404 {object} error // @Failure 500 {object} error // @Router /api/v1/name[post]
But I need to enable ReadOnly for ID. How can I enable the parameters in Openapi 3.0?