Pull requests

#37 Merged
Repository
Deleted repository
Branch
default (ae16da4fc025)
Repository
birkenfeld/sphinx-contrib sphinx-contrib
Branch
default

Summary: Change 'queryparameter' from GroupedField to TypedField

Author
  1. ViktorHaag
Reviewers
Description

Change the 'queryparameter' field in HTTPResource to be a TypedField instead of a GroupedField, so that it can use the same in-line type formatting structure that 'parameter' and 'jsonparameter' benefit from.

  • Learn about pull requests

Comments (7)

  1. ViktorHaag author

    Hi Hong Minhee -- I suggest we change the 'queryparameter' field to be a TypedField instead of a GroupedField, so that it can take a "type" and put it inline in the output, just as the 'parameter' field does.

  2. ViktorHaag author

    For our API docs, it does, yes. All the query parameters will have obviously string types, but the 'type' can also indicate how that string value should get interpreted by the back end service (or what kind of value the caller should be providing). In some cases, for example, we have APIs that must provide a particular kind of data in a query parameter: a specific kind of Key, or ID value, and it's useful to describe what kind of ID it is, so that the caller knows how it should be formed (i.e., is it a 'numeric' ID, or is it a GUID value?)

    I have made a branch and am using this in our local docs build, and I thought it would have general usefulness. The other nice thing about typed fields is they don't require you to specify a type, so if you don't, you'll get just the same output as with the GroupedField (as far as I can tell).