Skip to content

@PathParam type conversion #326

@dansiviter

Description

@dansiviter

The current spec states:

The method parameter may be of type String, any Java primitive type or any boxed version thereof.

This is somewhat limiting so could be opened up to match the same specification as JAX-RS:

  • Have a static method named valueOf or fromString that accepts a single String argument (see, for example, Integer.valueOf(String)).
  • Have a registered implementation of ParamConverterProvider JAX-RS extension SPI that returns a ParamConverter instance capable of a "from string" conversion for the type.
    Any failure should respond with a 404 Not Found.

This would promote consistency and clean up the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    API (Both)Impacts the client and server APIenhancementAdding a new feature or improving an existing one

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions