The Swagger documentation for the endpoint /StopPoint/{ids} states that a ‘Place’ type will be returned for the ‘children’ property in a StopPoint. However it seems that the type is actually a ‘StopPoint’
I note there’s been no response to this since April 2018, but I am seeing the same problem. I have used the Swagger spec to generate a Java client API, and am unable to do a /StopPoint/StopPoint_Get for any stop that is a NaptanBusCoachStation, which has child StopPoints, because the generated code is expecting a Place, as per the spec, but what is returned in children as StopPoints. I suspect this is because StopPoint is actually a sub-class of Place, but no inheritance/discriminators are defined in the Swagger spec.
Did you find any workaround, Malcolm? Or can someone from TfL Tech comment?
On a related note, calls to /StopPoint/StopPoint_GetByType return children as a list of Places, whereas /StopPoint/StopPoint_Get returns children as a list of StopPoints. Not sure whether this is intended or not? But this means that, even if the swagger file is updated with details of subtypes, one would have to call /StopPoint/StopPoint_GetByType to get all the bus stops, and then call /StopPoint/StopPoint_Get for any IDs that have children (414 records including NaptanBusCoachStations), in order to get the StopPoints needed.
On a related note, calls to /StopPoint/StopPoint_GetByType return children as a list of Places
This doesn’t appear to be happening for me now. If it’s been fixed, thank you very much! And if not, then I’m somewhat mystified. But either way, it looks good - I am seeing StopPoints returned from this call now.