Search code examples
parametersapiblueprintblueprintapiary.ioapiary

More [GET] request-response examples with different URI parameters


I have an URI: /lessons/{language}/{type}

I would like to have more mock requests-responses with different parameters {language} and {type} in my blueprint. It seems to me that this is not possible for GET method.

My idea is that: GET /lessons/cs/easy would return:

    [{
      "id": 1, "title": "Střední řada: s, l"
    }, {
      "id": 2, "title": "Střední řada: g, h"
    }]     

And GET /lessons/de/easy would return:

    [{
      "id": 1, "title": "Mittle words: s, l"
    }, {
      "id": 2, "title": "Mittle words: g, h"
    }] 

This is my syntax (down below) which is not working.

This syntax not working. I would like to have something like this

This is how it looks like in preview. This is how it looks like in preview.


Solution

  • This is not currently possible with API Blueprint. But we have a feature request about this at https://github.com/apiaryio/api-blueprint/issues/58 and we are planning to implement this very soon.

    Thanks.