#13 ✓closed
Ben Hood

Differentiate between optional and mandatory parameters

Reported by Ben Hood | September 27th, 2010 @ 11:09 AM

The differentiation between (mandatory) URL parameters, (optional) Query parameters and what goes in the JSON body is not clear. The generated documentation needs to have a section about parameters divided into optional and mandatory parameters. To do this, we will probably have to do the following:

  • Annotate each optional parameter in the function definition as opposed to annotating the function itself (as it is currently)
  • Process the PathParam annotations to be mandatory parameters

Comments and changes to this ticket

  • Michal Cudrnak

    Michal Cudrnak September 28th, 2010 @ 12:16 PM

    • State changed from “new” to “resolved”

    The markdown template now has separate sections for mandatory and optional parameters.

    The resource annotations for this are still per method since Jersey will die of class loading issues when it sees annotations that come from a dependency as opposed to from the project itself (here: project=agent, dependency=docgen).

    Also note that Scala has an unnatural syntax for nested Java annotations:

    @Annotation1(new Annotation2(name="..."))
    
    as opposed to the javaesque
    @Annotation1(@Annotation(name="..."))
    
    At least we're lucky as this is a feature only since Scala 2.8.
  • Ben Hood

    Ben Hood September 28th, 2010 @ 01:14 PM

    • State changed from “resolved” to “closed”
  • Ben Hood

    Ben Hood September 28th, 2010 @ 01:18 PM

    • State changed from “closed” to “open”

    Reopening because we should probably put the datatype into the MandatoryParam annotation.

  • Michal Cudrnak

    Michal Cudrnak September 28th, 2010 @ 02:00 PM

    • State changed from “open” to “resolved”

    Fixed.

  • Ben Hood

    Ben Hood September 28th, 2010 @ 06:20 PM

    • State changed from “resolved” to “closed”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A Real Time Differencing Tool.

Shared Ticket Bins

People watching this ticket

Tags

Pages