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

import from exists contract not generate OpenApi specs #112

Closed
stvkoch opened this issue May 16, 2024 · 1 comment · Fixed by #115 · May be fixed by hyperledger/web3j-openapi-gradle-plugin#17
Closed

import from exists contract not generate OpenApi specs #112

stvkoch opened this issue May 16, 2024 · 1 comment · Fixed by #115 · May be fixed by hyperledger/web3j-openapi-gradle-plugin#17
Assignees

Comments

@stvkoch
Copy link

stvkoch commented May 16, 2024

The swagger and openApi specs are empty when I create a new project.

I'm following the documentation and using the command:

web3j openapi import \
    -s=./contracts/contracts/HelloWorld.sol \
    --package=dummy.HelloWorld \
    --project-name=HelloWorld \
    --output-dir=./web3j

First thing I did was added into global gradle settings the missing "consensys" dep to be able to run the project.

when run the task ./gradlew run the swagger doesn't show any helloworld methods showing "no operations defined..."

looking into build/resources/openapi/main/openapi.json I found just the header {"openapi":"3.0.1"}

Looks good the ABIs and metadata files into build/resources/main/solidity...

I'm running a hardhat local node and set the envs:

export WEB3J_ENDPOINT=http://localhost:8545
export WEB3J_PRIVATE_KEY=...
export WEB3J_OPENAPI_HOST=localhost
export WEB3J_OPENAPI_PORT=9090

I'm missing some step?

It's happens too when I just create a new project using default parameters

web3j openapi new
@NickSneo NickSneo self-assigned this Oct 1, 2024
@NickSneo
Copy link
Contributor

NickSneo commented Oct 1, 2024

We are updating web3j openapi repo, I can confirm it is broken right now

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