apiaryio / api-blueprint

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

MSON Get Array? #378

Closed pete001 closed 7 years ago

pete001 commented 7 years ago

Hi there, im trying to express a GET array for URL parameters.

In my MSON document, i have the following (snipped certain parts for readability):

## Aggregate Advertiser [GET /reporting/report_advertiser/campaign/{campaign_id}/overview/{pivot}/range/{sort}{?start_date,end_date,multipivot}]

Return the aggregation stats for the requested `pivot` within the requested time period.

+ Parameters
    + campaign_id: 10l176 - ID of the campaign
    + pivot: country (enum[string]) - The chosen entity to aggregate on
        + primary - All Publishers
        ...snip...
    + sort: conversion - How to rank the entities (in descending order)
        + click - The number of clicks
        ...snip...
    + start_date: `2016-02-30T05:15:32Z` (required)
    + end_date: `2016-03-10T19:02:35Z` (required)

For the multipivot parameter, i want to express this as a GET array, for example, this could be:

multipivot[country][]=GB&multipivot[country][]=US&multipivot['adref'][]=Plaecement

Is it possible to express this in apib/mson?

pete001 commented 7 years ago

Ahh, i found https://github.com/apiaryio/api-blueprint/issues/240 apologies for the dupe.