ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
137 stars 58 forks source link

Introduce util functions to convert query and header record with the `http:Query` and the `http:Header` annotations #7019

Closed TharmiganK closed 5 days ago

TharmiganK commented 5 days ago

Description:

$Subject

This is a requirement from the OpenAPI generated code, where we support adding http:Header and http:Query annotations in the generated record types for query and header. In the client class we are using remote methods and have separate util functions to convert headers and queries to the required representations:

This functions should consider the name attribute from the http:Header and http:Query annotations. Since we cannot access the annotations in the record fields in the ballerina side, we need to write conversion functions in Java. These functions are added in the HTTP package

Describe your task(s)

Related Issues (optional): https://github.com/ballerina-platform/ballerina-library/issues/6867