jersey
  1. jersey
  2. JERSEY-1762

Bean Validation constraint not honored in POST

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-m12
    • Fix Version/s: 2.0-rc1
    • Component/s: extensions
    • Labels:
      None

      Description

      For a resource method as:

      @POST
      @Produces(MediaType.TEXT_PLAIN)
      public String post(@Size(min = 3) String payload)

      { return payload; }

      a POST message with "fo" payload. It should instead throw an error.

      GlassFish b76.

        Activity

        Hide
        Michal Gajdos added a comment -
        • in 2.0-m12 bean validation is not enabled by default (you need to register org.glassfish.jersey.server.validation.ValidationFeature in your application to enable it)
        • this issue is fixed in 2.0-m13 so there is no need to manually register the feature to enable validation (2.0-m13 is not integrated in GF at the moment)
        Show
        Michal Gajdos added a comment - in 2.0-m12 bean validation is not enabled by default (you need to register org.glassfish.jersey.server.validation.ValidationFeature in your application to enable it) this issue is fixed in 2.0-m13 so there is no need to manually register the feature to enable validation (2.0-m13 is not integrated in GF at the moment)
        Hide
        arungupta added a comment -

        Will wait for m13 integration in GlassFish. What is the ETA ?

        Show
        arungupta added a comment - Will wait for m13 integration in GlassFish. What is the ETA ?
        Hide
        Michal Gajdos added a comment -

        Should work in GF4.0-b80.

        Show
        Michal Gajdos added a comment - Should work in GF4.0-b80.

          People

          • Assignee:
            Michal Gajdos
            Reporter:
            arungupta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: