The Movie Database Support

Hi, I've used Swagger generator CLI and generated an API client for Java/Retrofit2. It successfully generated a complete project. But... There are at least 2 problems:

  • Most of the models are named with meaningless names like "InlineResponse20012"
  • Some of the generated service methods return Void.

In the OAS json I've seen some definitions like

"$ref": "#/definitions/movie-list-result-object"

but they are only defined for few endpoints. Can I do something to generate a full and complete API client without?

11 replies (on page 1 of 1)

Jump to last post

Hi @sevar83

You can read my reply from another user about this here: https://www.themoviedb.org/talk/58691a749251414e7500c442

Short version: It's because Stoplight is doing some custom things. We'll all have to bug them to get this improved wink

@travisbell said:

Hi @sevar83

You can read my reply from another user about this here: https://www.themoviedb.org/talk/58691a749251414e7500c442

Short version: It's because Stoplight is doing some custom things. We'll all have to bug them to get this improved wink

Well, but I don't get any generator or compilation error. The problem is that the responses are inlined in the schema. They don't have names defined. So, the generator can't create Java model classes with meaningful names. I think the schema must have those "$ref": "#/definitions/model-xyz" for each response. Is that Stoplight filters this info by mistake or it's just not defined?

Stoplight generates that 100%, so I'm not sure. I'll submit a support request with them and let you know what I find out.

You may also provide this screenshot: http://imgur.com/a/91bII

I'm working with Stoplight on this, they think they know the problem and to test the theory, what happens if you use this OAS file? Does it work?

Great! I'll give it a try right now.

There's some improvement but small. The model classes are still wrong named. The new oas.json has $refs on the parameters and error responses, but looks like it needs $refs on the status 200 responses to correctly name the models. I could send you a project that is fully set up. You just need to run "./run.sh" to start swagger codegen. Everything is configured. The included oas.json is the one you sent me. The output is also inlcluded. Which email to send it to?

I know this is an old post but just wanted to add that I'm also having difficulty generating clients from the Swagger (OAS) spec. I'm using OpenAPI Generator.

Hi @justinhrobbins@gmail.com, the version of Stoplight we are using has been EOL'd. At some point in the near future we'll be migrating to a new platform but there's nothing that can be done about this in the currently state of the docs.

Thanks for the quick reply @travisbell. I'm a new user to TheMovieDb API and really appreciate your efforts. If/when there's a Trello issue for this I'll gladly give it an upvote. Thanks!

@travisbell said:

Hi @justinhrobbins@gmail.com, the version of Stoplight we are using has been EOL'd. At some point in the near future we'll be migrating to a new platform but there's nothing that can be done about this in the currently state of the docs.

Those are great news @travisbell! Sincerely looking forward to using the API again without hacking the OAS 😊

Can't find a movie or TV show? Login to create it.

Want to rate or add this item to a list?

Login