Swagger specification missing definitions


#1

The Swagger spec provided for the Unified API (https://api.tfl.gov.uk/swagger/docs/v1) does not contain definitions for the DisambiguationResult type, as returned by /Journey/JourneyResults for ambiguous results.

Is it possible to find this definition or have it added to the spec?

Thanks.


#2

Yes, that endpoint is unusual (and some would argue, not very RESTful) for having two possible response types. I’ve created a feature request on whether the second type can be added to the spec.

In the meantime, if you’re using .NET, the type is defined in our DTO assembly. Or you may be able to extract the information from the assembly there and translate to the language of your choosing.

Feature request: TECH-219


#3

For what it’s worth I created a somewhat cleaned up Swagger specification tfl-unified-api-swagger. Beware of course it’ll fall out of step with any future updates. I also dropped some endpoints where the specification was incomplete.