Open kevinresol opened 7 years ago
I'll have to think about this. For the proxy it's actually not a big deal, but for the router it's a bit of a nightmare.
Right now I would recommend something like this as a workaround:
@:post('/spreadsheets/$spreadsheetId/sheets/$copySheet')
public function copyTo(spreadSheetId:String, cmd:CopySheet);
abstract CopySheet to Partial {
@:from static function ofSheedId(id:String):CopySheet;
}
Okay, that should work. But I still have the "tink_json cannot parse Dynamic" thingy :joy:
I am trying to generate a remote client for the Google Sheet API. Most things are done: e.g. read the doc and generate the classes, etc.
But I hit a point that I think I can't easily resolve. Here is a sample of the API: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo
The URL is as below:
/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo
I tried to convert that to a tink_web metadata like so:
But tink_web complains there are surplus in the route (
sheetId:copyTo
) and a uncaptured argument (sheetId
). Because the wholesheetId:copyTo
string is treated as a whole. But obviously an identifier cannot contain symbols like that.Is it possible that tink_web do a "partial" capture in that case? It would also be nice to support braces like
${sheetId}copyTo
just in case someone wants combine a variable into a string.