Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README.mustache template for the Erlang server generator #20138

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

iri
Copy link

@iri iri commented Nov 19, 2024

Code not changed.

Changes made to the Erlang server generator's user instruction template ("README.mustache" file):

  1. Corrected the argument in section 4.1 of the user instructions (number 4.1 is from the old version of the "README.mustache" file).
    Second argument of openapi_server:start/2, for the generated Erlang code must now be in a different format than proposed in the instructions (see lines 13-16 of the "server.mustache" file). Initially, I tried to follow instructions but the server failed to start. I discovered that the argument format did not match the server's expectations, causing the port number not to be passed to cowboy:start_clear/3. This has now been fixed in the new version of template.

  2. Reviewed and updated the text of the user instructions to remove any ambiguities.

  3. Tested the user instructions for accuracy and completeness.

…ne error and updated the usage instructions

Changes made to the Erlang server generator's user instructions ("README.mustache" file):

1. Corrected the argument in section 4.1 of the user instructions.
   In openapi_server:start/2, the second argument for the generated Erlang code must now be in a different format than proposed in the instructions (see lines 13-16 of the "server.mustache" file).
   Initially, the server failed to start, and after some debugging, I discovered that the argument format did not match the server's expectations, causing the port number not to be passed to cowboy:start_clear/3. This has now been fixed.

2. Reviewed and updated the text of the user instructions to remove any ambiguities.

3. Tested the user instructions for accuracy and completeness.
@wing328
Copy link
Member

wing328 commented Nov 19, 2024

thanks for the PR

please follow step 3 to update the samples as well.

cc @NelsonVides

@iri
Copy link
Author

iri commented Nov 19, 2024

please follow step 3 to update the samples as well.

I will do one more commit tomorrow to fix markdown issue in "README.mustache". And then will regenerate the erlang-server sample again.

@NelsonVides
Copy link
Contributor

It looks like a better readme than the previously available one, but maybe it's not how I'd do it, as I don't really like modifying auto-generated files. For the record, I'd leave the generated code into either a separate dependency from a separate repository, or a separate app in an umbrella repository.

Nevertheless, this is still good progress, it at least presents a tutorial that actually works, so very cool! The only thing I'd add is a notice that the modified files will be overridden next time the API is generated, so we could use the .openapi-generator-ignore if we want to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants