Swagger specification missing definitions

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.

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

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.

1 Like

Sorry to drag up such an old thread, but the DTO assembly would be amazingly useful to me, if it were a .NET Standard assembly instead of .NET Framework. Are there plans to release this as a .NET Standard assembly, or shall I work on porting it myself? I’d love to consume it from a .NET Core application but, of course, the two aren’t compatible.

1 Like

I stopped working with TfL a while ago so your best bet is to start a new thread or e-mail the developer relations e-mail address (whatever that is these days - check on the website). It should be straightforward to change the build pipeline to spit out a .NET Standard assembly instead.