Skip to content

Confused with default ModuleName.Client #72

Answered by aj-foster
jaeyson asked this question in Q&A
Discussion options

You must be logged in to vote

Hello there!

It looks like there's a naming conflict between the operations in your API's description and the default names used by the generator. But don't worry, because you can fix it.

The code generator doesn't want to force you to use a specific library for making HTTP requests, so it makes all of its function calls to a generic module like MyApp.Client. This is a module that you would implement, and it can pass on the request to any HTTP library you would like. Here's an example.

Unfortunately, it looks like the API description has some operations that would naturally be placed in a "Client" module. This is unusual to find in an API description, but obviously not impossible. Luckily…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jaeyson
Comment options

Answer selected by jaeyson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants