Add support for enumerated values from a URL #52

Closed
switzer opened this Issue Oct 23, 2012 · 5 comments

Projects

None yet

4 participants

@switzer
Contributor
switzer commented Oct 23, 2012

Hi! I am really liking iodocs - thanks for opening it to everyone.

I like the 'enumerated' data type for lists of values - however, this list goes stale if the values are a dictionary that is constantly updated. For example, I would like to be able to provide a dictionary value as follows:

"parameters":[
  {
    "Name":"timezone",
    "Required":"Y",
    "Default":"America/New_York",
    "Type":"enumerated",
    "EnumeratedURL":"http://api.jirafe.com/timezones"
    "Description":"The time zone that this site uses for order dates"
  }
]

The URL passed in can be a list of values separated by a CR by default (the URL in my example works).

@challgren
Contributor

Or even maybe json with well structured data

@switzer
Contributor
switzer commented Oct 25, 2012

Good point!

@challgren
Contributor

That way theres a key list for abbreviated values

@jyankel
jyankel commented Mar 21, 2013

This would be a very nice addition.

@phairow
Contributor
phairow commented Oct 10, 2014

this one is supported currently. add the enum attribute to your parameter like this:

                "type":"string",
                "enum": ["user", "friends", "everyone"],

see the public/data/rdio.json example for to see it working.

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