You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.
The We the People API documentation needs to include documentation explaining the attributes of a petition resource JSON object, similarly to how the INDEX operation's arguments are documented with their name, type, and valid values.
One reason this is important is for cases where it is impossible for developers to guess all enumerative values for an attribute in order to handle all expected states.
For example, it is difficult for developers to deduce all possible values for a petition resource's "status" JSON attribute. Within the "Resource: Petitions" section of the documentation, the "status" attribute should be listed, along with every other JSON attribute of the petition resource. The "status" attribute documentation would ideally include all possible values which We the People API may return and a brief explanation about the correlation between the possible "status" values and their real-world petition counterparts (e.g.., " 'responded' would be returned if the petition has received an official response from the White House").
Below I have listed an example of what this would look like.
The We the People API documentation would list every JSON attribute, along with:
argument name
data type
an explanation of what the argument is
valid values for the argument, for arguments which have enumerative values (e.g. petition 'status' attribute would list: 'responded', 'awaiting response', 'open', and I would list the rest, but the documentation hasn't revealed all possible values....do you get where I'm going with this?)
stringstatus
Represents the status of the petition. Possible values returned for this attribute are 'responded', 'awaiting response', 'open', and [any other valid values of which I am unaware]
The text was updated successfully, but these errors were encountered:
Thanks, good flag - we're in the process of sortign through all of the issues/requests that came out of the last hackathon, will see about getting this into the queue.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The We the People API documentation needs to include documentation explaining the attributes of a petition resource JSON object, similarly to how the INDEX operation's arguments are documented with their name, type, and valid values.
One reason this is important is for cases where it is impossible for developers to guess all enumerative values for an attribute in order to handle all expected states.
For example, it is difficult for developers to deduce all possible values for a petition resource's "status" JSON attribute. Within the "Resource: Petitions" section of the documentation, the "status" attribute should be listed, along with every other JSON attribute of the petition resource. The "status" attribute documentation would ideally include all possible values which We the People API may return and a brief explanation about the correlation between the possible "status" values and their real-world petition counterparts (e.g.., " 'responded' would be returned if the petition has received an official response from the White House").
Below I have listed an example of what this would look like.
The We the People API documentation would list every JSON attribute, along with:
string status
Represents the status of the petition. Possible values returned for this attribute are 'responded', 'awaiting response', 'open', and [any other valid values of which I am unaware]
The text was updated successfully, but these errors were encountered: