Search code examples
apiblueprintapiary.ioapiary

Specify query parameter for a single HTTP method


To illustrate my problem, I made a condensed example from the Apiary.io blueprint tutorial.

FORMAT: 1A

# Gist Fox API

# Group Gist
Gist-related resources of *Gist Fox API*.

## Gists Collection [/gists{?since}]

### List All Gists [GET]
+ Parameters
    + since (optional, string) ... Timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ` Only gists updated at or after this time are returned.

+ Response 200

        {
            items: []
        }

### Create a Gist [POST]
To create a new Gist simply provide a JSON hash of the *description* and *content* attributes for the new Gist. 

+ Request (application/json)

        {
            "description": "Description of Gist",
            "content": "String content"
        }

+ Response 201

        {
        }

Then in my apiary documentation I get the following:

GET   /gists{?since}
POST  /gists{?since}

However, for me it makes sense to have the since query parameter only for the GET request. Unfortunately I didn't find a way to achieve this result:

GET   /gists{?since}
POST  /gists

Is it something possible?


Solution

  • Update

    (Thursday, 23 Oct 2014)

    The fix has been deployed; could you please give it a try and let me know if everything works as expected?


    The bad news

    It is our (Apiary) bug and you're not doing anything wrong :-(

    The good news

    It is a known bug we are currently working on and it is going to be fixed with the end of this week (Sunday, 19 Oct 2014) :-)