-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Conversation
…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.
thanks for the PR please follow step 3 to update the samples as well. cc @NelsonVides |
I will do one more commit tomorrow to fix markdown issue in "README.mustache". And then will regenerate the erlang-server sample again. |
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 |
Fixed error in README end re-generated sample |
samples updated via 38bb4bc |
Code not changed.
Changes made to the Erlang server generator's user instruction template ("README.mustache" file):
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.
Reviewed and updated the text of the user instructions to remove any ambiguities.
Tested the user instructions for accuracy and completeness.