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

Create a contributors guide #57

Closed
hardworkingcoder opened this issue Jul 16, 2017 · 4 comments
Closed

Create a contributors guide #57

hardworkingcoder opened this issue Jul 16, 2017 · 4 comments
Assignees

Comments

@hardworkingcoder
Copy link
Contributor

hardworkingcoder commented Jul 16, 2017

Similar to https://github.com/datadotworld/dwapi-spec/blob/master/CONTRIBUTING.md please.

@hardworkingcoder
Copy link
Contributor Author

Notes I have from conversation:

A large portion of that is automated. This is typically a 3 step process:

  1. Refresh https://github.com/datadotworld/data.world-py/blob/master/datadotworld/client/swagger-dwapi-def.json from https://api.data.world/v0/swagger.json
  2. Re-generate the _swagger package using codegen (see: https://github.com/datadotworld/data.world-py/blob/master/datadotworld/client/.swagger-codegen-ignore#L18, for instruction)
  3. Update https://github.com/datadotworld/data.world-py/blob/master/datadotworld/client/api.py as needed, prioritizing backwards-compatibility

With respect to #2, you have to use a tool called swagger-codegen: https://github.com/swagger-api/swagger-codegen (it will automatically generate all the code you see in _swagger).
GitHub
swagger-api/swagger-codegen
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

@hardworkingcoder
Copy link
Contributor Author

I installed Swagger-codegen by doing the following
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.3/swagger-codegen-cli-2.2.3.jar -O swagger-codegen-cli.jar
sudo apt-get install default-jre
java -jar swagger-codegen-cli.jar help

@hardworkingcoder
Copy link
Contributor Author

@hardworkingcoder
Copy link
Contributor Author

hardworkingcoder commented Aug 1, 2017

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

No branches or pull requests

3 participants