Skip to content

Expand POJO in URL params to multiple object params #2018

Open
@desoliture

Description

@desoliture

Hi!
I think I might need some help here.

Lets say, I have this API contract GET /api/v1/game with url params - gameId, token, settings[language,currency]
In my case, I need the final URL to be like this: /api/v1/game?gameId=1&token=2&settings[language]=en&settings[currency]=USD

I have proper DTO with required fields including 'Settings' object. So for this scenario the temporary solution was using @Param("settings[language]") and so on, but then I should get rid of Settings field.
Is there a more proper way to expand an POJO field to multiple URL params in the style I mentioned before?

Metadata

Metadata

Assignees

No one assigned

    Labels

    feedback providedFeedback has been provided to the authorquestionGeneral usage or 'how-to' questions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions