Multiple Examples for a Single Response


#1

I am unable to find any code anywhere that demonstrates using a !include for multiple examples. I’m trying to attempt the following:

200:
  description: Successful project creation
  body:
    application/json:
      type: JiraResponseSuccess
      example: !include examples/jira/projects/success/CreateSuccess.json
400:
  description: User error
  body:
    application/json:
      type: JiraResponseError
      examples:
        username: 
          !include examples/jira/projects/fail/user/UsernameFail.json
        projectKey: 
          !include examples/jira/projects/fail/user/ProjectKeyFail.json

The first example renders fine (where there’s only a single response) whereas the second does not. The syntax is correct, but I don’t understand why it’s choking on the !include statements. Do I have an error or do I just need to wait for the tooling to catch up?


#2

Can you upload your example to gist? I will have a look on it.


#3

Sorry it took so long, here’s the gist https://gist.github.com/jwheeler31/ac93b3e5bfbe4cfa1e9214110daff889