ig063
4 years agoNew Member
encoding query string
I am trying to generate endpoint and stubs using open api generator.
For many of the endpoints, the api uses a single query parameter which is a filter object – holding the actual parameters – that is base64-encoded.
How to set up yam file so that I it will generate something like this.
@GetMapping("/filter") String home(@RequestParam() String input) {
RequesObj o = decode(input); ... } }
Steps
- 1. Send the encoded JSON as request param (/filter?input=SGVsbG8gV29ybGQh....).
- 2. On the server-side, decode q.
- 3. Deserialize the JSON string