You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
header record -> map<string|string[]>
query record -> query string
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)
Introduce a util function to convert a header record map to a map<string|string[]> with the names specified in the http:Header annotation (This function additionally does the conversion anydata -> string)
Introduce a util function to convert a query record map to a map<anydata> with the names specified in the http:Query annotation (There is no value conversion in this method)
Description:
This is a requirement from the OpenAPI generated code, where we support adding
http:Header
andhttp: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:map<string|string[]>
This functions should consider the name attribute from the
http:Header
andhttp: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 packageDescribe your task(s)
map<string|string[]>
with the names specified in thehttp:Header
annotation (This function additionally does the conversionanydata
->string
)map<anydata>
with the names specified in thehttp:Query
annotation (There is no value conversion in this method)Related Issues (optional):
#6867
The text was updated successfully, but these errors were encountered: