apiaryio / api-blueprint

API Blueprint
https://apiblueprint.org
MIT License
8.64k stars 2.14k forks source link

Remove empty query variable from request when writing blueprint this way #312

Closed hassansin closed 8 years ago

hassansin commented 8 years ago

I am using the Polls api to show my use case. It has one Resource section and under it two Action sections with different URI. It seems valid to me and the drafter doesn't complain either.


FORMAT: 1A
HOST: https://polls.apiblueprint.org/

# Polls

## Questions [/questions]

### List all questions [GET /questions{?page}]

+ Parameters
    + page (optional, number) - The page of questions to return

+ Response 200

## View a question detail  [GET /questions/{question_id}]

+ Parameters
    + question_id (required, number, `1`) ... ID of the Question in form of an integer

+ Response 200 

But when I leave the page query empty, it still includes the default value of page=page in the request:

image

image

netmilk commented 8 years ago

Hey @hassansin! Thank you very much for reporting this. We'll track it as a bug internally and it will be scheduled for fixing soon.

hassansin commented 8 years ago

Awesome. Thanks!