Replies: 1 comment
-
In this case you need to define two separate methods, one with the path "/{id}" and one with the path "/" - these can be implemented by calling the same method. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our API we have a
GET
route that can either receive aid
param or not.If the
id
is passed, it will find all categories with that category as parent. If theid
is not past, it will list all categories withparent_id
= 1.In the design, I have this:
How do I specify the
{id}
to be optional?Beta Was this translation helpful? Give feedback.
All reactions