Skip to content

First beta release of Erlang client generator #6502

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

Merged
merged 8 commits into from
Nov 12, 2017

Conversation

tsloughter
Copy link
Contributor

PR checklist

  • [X ] Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • [ X] Filed the PR against the correct branch: master for non-breaking changes and 3.0.0 branch for breaking (non-backward compatible) changes.

Description of the PR

When it is reading this resolves #3816

@wing328
Copy link
Contributor

wing328 commented Sep 18, 2017

@tsloughter thanks for the new generator.

To modify to create another path-related mustache variable, you want want to follow scalatra approach to do it in the postProcessOperations using vendor extensions: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalatraServerCodegen.java#L124

@tsloughter
Copy link
Contributor Author

@wing328 thanks, I'll take a look at the scalatra approach today.

@wing328
Copy link
Contributor

wing328 commented Sep 29, 2017

@tsloughter Please run "bin/erlang-petstore-client.sh" and include the samples in this PR.

Please also create "bin/windows/erlang-petstore-client.bat" for Windows users as well.

@tsloughter
Copy link
Contributor Author

Added. Still a number of things I need to or want to do. I'll try to put a list in here tomorrow of what I think needs to be done.

@wing328
Copy link
Contributor

wing328 commented Oct 16, 2017

@tsloughter shall we release the Erlang client generator as alpha/beta so as to collect feedbacks from the community?

@tsloughter
Copy link
Contributor Author

Hey, maybe wait a couple days? I forgot to put together that list I said I would... I'd like to get that and a few small things changed.

@tsloughter
Copy link
Contributor Author

And I mean that I'll hopefully get time to finish those things and figure out what else needs to be done within a couple days, but that if I don't then merging it is also fine at that point to get it moving along and in an alpha state :)

@tsloughter
Copy link
Contributor Author

I pushed some updates. It doesn't yet handle produces types correctly, just always passing the body for the default response to a json decoder. This should be easy to clean up by adding a helper module that takes the Content-Type and the body.

I also want to add arguments for passing authentication to api calls that need it. Or might just add a Context variable to every api call that can include that...

@wing328
Copy link
Contributor

wing328 commented Oct 19, 2017

@tsloughter thanks for the update. I'll take a look this weekend and let you know if I've any feedback.

return input.replace("*/", "*_/").replace("/*", "/_*");
}

class ExtendedCodegenOperation extends CodegenOperation {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tsloughter Do we still need this Extended class after using vendor extensions to stored the customized path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yea, probably. Will clean it up. More might have got left like that because of how I copied the module from another implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or no, not so simple, would have to look closer at how ExtendedCodegenOperation is used in postProcessOperations because that is still needed, maybe it can just be replaced with CodegenOperation but just doing that naively and running it didn't compile, so I'll need to look more later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tsloughter that's ok. Let's keep it for now.

@wing328
Copy link
Contributor

wing328 commented Oct 26, 2017

@tsloughter I would suggest doing a alpha release and start engaging other Erlang developers to review and enhance it.

@wing328 wing328 merged commit b9651e5 into swagger-api:master Nov 12, 2017
@wing328 wing328 changed the title WIP: initial commit for Erlang client generator First alpha release of Erlang client generator Nov 12, 2017
@wing328
Copy link
Contributor

wing328 commented Nov 12, 2017

UPDATE:

  • add you as the template creator of Erlang
  • minor formatting change via 444a05c

@wing328 wing328 changed the title First alpha release of Erlang client generator First beta release of Erlang client generator Nov 12, 2017
jimschubert added a commit to jimschubert/swagger-codegen that referenced this pull request Nov 14, 2017
* master: (101 commits)
  [Swift4] Allow for custom dateformatter to be used (swagger-api#6672)
  [haskell-http-client] fix bug when generating models-only (swagger-api#6931)
  fix typo: crediential => credential
  minor typo fix
  [csharp] fix enum serialization of first value (swagger-api#6873)
  [PHP] Improve docs and README (swagger-api#6935)
  Binary mode for file deserialization in python (swagger-api#6936)
  add python tornado test to travis
  [Python/tornado] add integration tests and fix bugs (swagger-api#6925)
  Fix PHP passes response body to ApiException (swagger-api#6923)
  [TypeScript][Node] Resolve TS2532 error (swagger-api#6932)
  skip "all" shell script
  minor formatting change
  Fixes Issue swagger-api#6841, Map for accessing additionalProperties is generated. (swagger-api#6886)
  add tsloughter as owner erlang
  WIP: initial commit for Erlang client generator (swagger-api#6502)
  add back php client test
  Switch Travis image from MacOS to Linux (swagger-api#6937)
  add link to ebook
  [Scala] Default case class Option types to None for non-required fields (swagger-api#6790)
  ...
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.

Erlang client generator
2 participants