Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-28784

JAX-RS validation fails for custom parameters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 4.30.x
    • 4.24.0.Final
    • cdi, project-examples
    • None
    • Hide
      1. Create a library project;
        1. Create a ParamConverterProvider that registers custom ParamConverter for custom type (e.g. java.time.YearMonth);
      2. Create a MicroProfile REST Client war project referencing library;
        1. Create a REST client proxy interface with endpoint that uses the custom type (e.g. QueryParam);
        2. Register custom provider with @RegisterProvider(NameOfCustomParamConverterProvider.class)
      3. Confirms validation is ok;
      4. Export/publish the library, import to REST project and close library project;
      5. Update REST project (Alt+F5) and confirm validation error message on endpoint.

      Minimum sample projects:

      Show
      Create a library project; Create a ParamConverterProvider that registers custom ParamConverter for custom type (e.g. java.time.YearMonth ); Create a MicroProfile REST Client war project referencing library; Create a REST client proxy interface with endpoint that uses the custom type (e.g. QueryParam ); Register custom provider with @RegisterProvider(NameOfCustomParamConverterProvider.class) Confirms validation is ok; Export/publish the library, import to REST project and close library project; Update REST project (Alt+F5) and confirm validation error message on endpoint. Minimum sample projects: https://github.com/claudioweiler/rest-lib-test https://github.com/claudioweiler/rest-test
    • ---

    Description

      Custom types for REST parameters (e.g. QueryParam) fails with message:

      The type 'custom.type' is not valid for this parameter. See JAX-RS 2.0 Specification (section 3.2) for more information.

      Validation fails in a MicroProfile REST Client if the custom ParamConverterProvider is on an imported library jar, project is of type war and it has a web.xml file.

      Attachments

        Activity

          People

            stephane.bouchet Stephane Bouchet
            ceweiler Claudio Weiler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: