jersey
  1. jersey
  2. JERSEY-678

Design Time Validation of Jersey Annotation

    Details

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

      Description

      We want to have the ability to validate Jersey annotations at design time rather than waiting
      for the application to be deployed.

      Simple validation along the lines of GET with a body defined would be a good start but we
      can also match up @PathParam with entries in the @Path annotation for example.

      These needs to be done in a form that can be used in the code editors, IDE tools and
      from the command line when using Ant Maven etc.

      We are suggest something along the lines of this as a start:

      http://kingsfleet.blogspot.com/2009/09/validating-annotations-at-compile-time.html

      As we could easily integrate this into the JDevloper, Netbeans, and Eclipse tooling.

        Activity

        Hide
        Jakub Podlesak added a comment -

        IntelliJ IDEA already uses the BasicValidator utility in Jersey
        in order to do resource validation. See attached snapshot on how it
        looks for the end-user.

        To get the issue list corresponding to a given resource class,
        you will just:

        AbstractResource ar = IntrospectionModeller.createResource(MyResource.class);
        BasicValidator validator = new BasicValidator();
        validator.validate(ar);
        processIssueList(validator.getIssueList());

        Is there any chance you can re-use this in JDeveloper?

        Show
        Jakub Podlesak added a comment - IntelliJ IDEA already uses the BasicValidator utility in Jersey in order to do resource validation. See attached snapshot on how it looks for the end-user. To get the issue list corresponding to a given resource class, you will just: AbstractResource ar = IntrospectionModeller.createResource(MyResource.class); BasicValidator validator = new BasicValidator(); validator.validate(ar); processIssueList(validator.getIssueList()); Is there any chance you can re-use this in JDeveloper?

          People

          • Assignee:
            Unassigned
            Reporter:
            gdavison
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: