-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix code to let Erlang server codegen work #7319
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
base: 3.0.0
Are you sure you want to change the base?
Conversation
Note that continues integration check failed due to last commit to 3.0.0 done couple hours ago. My fixes didn't break any tests... |
Hello @x0id , For 3.0.0 handlebars is the template engine, all is*, isNot*, has* and hasNot* properties have been removed. And yea, you can use an extension, but we added some helpers to make this more practical, check this examples: |
@x0id did you check the latest stable version 2.3.0 to see if there are similar issues with the Erlang server generator? |
@wing328 no, when I played with v2.3 a month ago or so I didn't notice similar issues. |
Fix schema path
Please review @tsloughter |
Thanks, I'll need to compare this with fixes I have that I haven't made a PR for yet. Will get back to you soon. |
@x0id I have an open PR that should get merged today, then this should be rebased on it. Will let you know when it is merged. |
#7257 by @tsloughter has been merged into master. |
@tsloughter, your PR is about erlang-client 2.x , but this is erlang-server 3.0.0. |
@ten0s enhancements in the master will be sync'd to 3.0.0 branch later. I believe @HugoMario will do that later when he has time. |
c824674
to
7e5274a
Compare
Trying to gen erlang-server v3 I found it just not working due to numerous problems.
Some legitimate {{ and }} Erlang braces wrongly interpreted as mustaches in templates (it would be wise to select custom delimiter for Erlang templates from the beginning)
It seems that templates were initially made for jmustache extensions, but for some reason default template machine used is handlebars, so instead of -last one should use @last etc.
Somehow isQueryParam was not working, but I got it to work using vendorExtensions.x-is-query-param instead. Not sure if this is right solution though.
Intentionally or not, but hasMore was not properly populated, so I quick-fixed it using {{^@last}} in templates instead.
Finally I did manage to generate and compile some code from the v3 spec, but have not yet chance to review and test it thoroughly.
Please let me know if my fixes are not following design ideas or guidelines, or consider to apply otherwise. Thanks.