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

[Erlang] Add Erlang server generator #3758

Merged
merged 17 commits into from
Sep 9, 2016

Conversation

galaxie
Copy link
Contributor

@galaxie galaxie commented Sep 8, 2016

PR checklist

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

Description of the PR

This is the first version of Erlang code generation for an Erlang server.
As I see all of the repos here are mostly about clients, but we needed a working server so we created it first.

The purpose of this code generation is to create an Erlang server on top of cowboy app and handle all the routing and validation. The user is supposed to add his own handlers to provide any business logic to process requests. Any operation which is not covered by user defined handlers leads to 501 Not implemented error (instead of 200 OK approach in e.g go-server).

This attempt is FAR from being done. Some significant parts that are still missing or need refactoring that I would like to mention:

  • Tests
  • Requests validation
  • REST flow in cowboy handlers

and legions of other stuff.

@wing328
Copy link
Contributor

wing328 commented Sep 9, 2016

@galaxie thanks for the PR, which looks good as a starting point.

@wing328 wing328 merged commit f90626a into swagger-api:master Sep 9, 2016
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