I have created a RESTful API, and I am now defining the Open API 3.0 JSON representation for the usage of this API.
I am requiring usage of a parameter conditionally, when another parameter is present. So I can't really use either required: true
or required: false
because it needs to be conditional. Should I just define it as required: false
, and then in the summary
and / or description
say that it is required when the other parameter is being used? Or is there a way of defining dependency between parameters? I haven't found anything in the specs that mention a case like this.