Overloaded methods
Where mutliple endpoints can return the same type, and we have better coverage of variables for one of them, select that.
e.g. for Ultumus, multiple endpoints return the same type, index composition data, but one of them has a date parameter which will return the data for that date, the other does not have a date input and will return the latest or current data (either today or yesterday depending what time it is and whether the markets have closed)
Service Definition:
service UltumusIndexCompositionService {
@HttpOperation(url = "https://uatapi.ultumus.com/{clientCode}/apps/v1/z/index/edge/composition/{variantId}", method="GET" )
operation getIndexComposition(
@PathVariable(name = "clientCode") clientCode: ClientCode,
@PathVariable(name = "variantId") variantId: VariantId
): IndexComposition
@HttpOperation(url = "https://uatapi.ultumus.com/{clientCode}/apps/v1/z/index/edge/composition/{variantId}/{tReferenceDate}", method="GET")
operation getIndexCompositionForDate(
@PathVariable(name = "clientCode") clientCode: ClientCode,
@PathVariable(name = "variantId") variantId: VariantId,
@PathVariable(name = "tReferenceDate") tReferenceDate: TReferenceDate
): IndexComposition
}
Query:
given { VariantId = "IV000011090", ClientCode = "VYNE" }
find { IndexComposition }
Expected: Only the getIndexComposition is called, not getIndexCompositionForDate