wadl
  1. wadl
  2. WADL-69

No support for optional request/param in generated client

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      It would be nice to support non-required parameters in client generation.
      Currently when in the wadl there are optional parameter in request ("required" attribute is missing) e.g.

      <request> 
         <param name="startPeriod" type="xsd:dateTime" style="query" />
         <param name="endPeriod" type="xsd:dateTime" style="query" />
      </request>
      

      The generated client doesn't support to give one of them. Either all or none.

      GeneratedClient signatures
      public<T >T getAsRepresentationName(String startperiod, String endperiod, Class<T> returnType);
      public<T >T getAsRepresentationName(Class<T> returnType);
      

      If a null is given to a parameter an exception is thrown.

      java.lang.IllegalArgumentException: One or more of query value parameters are null.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            spyros
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: