Forum Discussion

gmackenzie's avatar
gmackenzie
New Contributor
3 years ago

Boolean Parameter and conditional schemas?

Is there a way to document a boolean parameter that determines whether or not an array will be returned in the response? For example, we've got multiple parameters that operate as, "if true, [example...
  • HKosova's avatar
    3 years ago

    OpenAPI Specification does not have a way to describe request/response correlation. See this discussion for details:

    https://github.com/OAI/OpenAPI-Specification/issues/2031

     

    You can, however, describe these conditions in the description of those response fields and the corresponding parameters.