Support multiple instances of the same parameter #64

Closed
wants to merge 44 commits into
from

Projects

None yet

7 participants

@dvogel
dvogel commented Jan 4, 2013

Some of our APIs use the same parameter twice, like so:

/path?x=1&x=2

This adds a MultipleAllowed key to the parameters entries that lets the user specify multiple values for the same parameter via a javascript snippet to duplicate the parameter row in the UI.

@konklone

So from now on - in addition to copying config.json.example, we will also have to copy apiconfig.json.example. The downside is that future additions or updates of apiconfig.json info needs to be duplicated in both the example file in the repo and the actual local one, and updating it client-side will require overwriting the local one and re-adding the API key.

The upside is that we can now put an API key into apiconfig.json, that gets sent as a request header instead of in the query string, and so remove the need for user to already have an API key before messing with the API. That's a pretty big user-side benefit, I think.

Also, you can send arbitrary headers, so - I added a User-agent header of "Sunlight iodocs" to the Congress API config, so that I can see in my analytics how many people and which endpoints people are using in my API-side analytics.

@phairow
phairow commented Oct 9, 2014

this cannot be merged. the changes in the remote branch are not related to the request. this feature is still needed and will have to be addressed another way. most likely through the use of schemas. currently schemas have been added to address the issue of structured input for the body of the request but they could be extended to allow definitions for some slightly complex types that are serialized to the query string or header or path parameters. In any case this pull request contains way to many changes and cannot be merged.

@phairow phairow closed this Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment