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

Returns Sample Values #2

Open
JohannesMayerConda opened this issue Dec 19, 2018 · 2 comments
Open

Returns Sample Values #2

JohannesMayerConda opened this issue Dec 19, 2018 · 2 comments

Comments

@JohannesMayerConda
Copy link

JohannesMayerConda commented Dec 19, 2018

I wanted to try this out...

Took me a while to get it running, here my quickfixes:

  • Give absolute path in SwaggerServiceGenerator.js to SwaggerService_template.hbs (might be a macOS issue)
  • Give absolute path in abi2api/index.js to swagger-codegen-cli.jar (might be a macOS issue)
  • abi2api.js fixed by changing the lib path to: parser.process(path.basename(contract_path, '.json') + "/" + path.basename(contract_path, '.json') + "ContractLib" + "/" + path.basename(contract_path, '.json') + "Controller.js") -> this totally is a bug or compatibility issue, right? It was "contract_lib" hardcoded and that directory didn't exist

Now I have my api under http://localhost:8080/docs but it seems to return just example values every time. Also the GET requests do not add parameters as I would expect them to (also doesn't work if I try it manually). In code the parameter seem to never reach the method (empty object)

Just wanted to ask if this project is incomplete from where I now stand or if there might be other things to fix?

@john-osullivan
Copy link
Contributor

john-osullivan commented Dec 19, 2018 via email

@JohannesMayerConda
Copy link
Author

Oh wow thanks for taking the time :)

My OS: macOS mojave 10.14.1

Here a contract I quickly created that should be fine for simulation and does essentially what I've tried:
https://pastebin.com/1GWMaADN

And the contract's compiled json (via openzeppelin project):
https://pastebin.com/rcAw9Gie

Also while you are at it please add web3 to the generated package.json dependencies. Otherwise you require users to have it installed globally (and I hate that ^^)

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

2 participants