I have an endpoint defined in my API that takes a path parameter.
The valid values for that parameter are already expressed as an enum, which I've defined as a schema component and used in a response.
Two questions:
- If you can just use a reference to that schema component as the parameter, why ever set up dedicated parameter components instead of using a generic schema component that you can re-use anywhere?
- If you should use parameters instead of generic schemas, can you create a parameter component that refers to a schema component? I can't find any syntax to do this that passes validation.
I'd paste my definitions here but I can't find any formatting option that doesn't make a hideous mess.