New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
separating commands by tags #224
Comments
@jmls great question. Right now Restish is set up to have a flat list of operation commands rather than a hierarchy like you are describing. There are a few different ways you could make a hierarchy and it's not easy to do this in a generic way that would work for everyone, but I'm open to ideas! As for using the same operation ID multiple times... see the OpenAPI spec:
I'm not sure what nestjs is doing or recommends, but the spec says they must be unique, which is why Restish uses them as the unique command name. Edit: also just FYI, you can provide an OpenAPI extension |
if I have an openapi spec that has a number of tags (let say "foo" and "bar") then when I do a
restish myapi -h
I getyes, my operation ids are the same (using nestjs and controllers, so generated from the method name)
I was hoping to be able to do something like
restish myapi foo update
restish myapi bar update
but it seems not.
Am I forced into changing the operationIds to be fooUpdate and barUpdate ? my restish api then looks like this
which kinda looks .. sucky ;)
So in a nutshell, I 'm looking for some way of using the tags in the spec to specify a command and sub-command (tag / operratiionid)
The text was updated successfully, but these errors were encountered: