Closed FabienM closed 6 years ago
Based on the content of your previous issue https://github.com/wI2L/fizz/issues/13, it looks like your closure prototypes are func (c *gin.Context) T
, so tonic does not send any input type informations to the generator, hence, it thinks there is no parameters for operations GET and DELETE.
The OpenAPI spec generator has no way to figure out the type of the parameters based solely on the path itself.
I suggest to fix the returned closures to accept an input struct that describe the path parameters you use in those operations.
type T struct {
Domain string `path:"domain"`
Name string `path:"name"`
Version string `path:"version"`
}
I have following router declaration:
Generated spec embeds parameter declaration only on the
PUT
route:And so OpenAPI parser claims some errors: