oapi-codegen
oapi-codegen copied to clipboard
Generate path as constant string
For example,
r.Group(func(r chi.Router) {
r.Get(options.BaseURL+"/something", wrapper.CreateSomething)
})
it would be great to make the string /something become public constant, as enum string, so that the other code could use this constant path directly.
Out of interest, what code would you find this useful to use this?
When the specification has to be parsed and to processed, the path becomes a key-like, that would be a unified way of access instead of literal string.