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

Duplicate code in the "_gen.go" file #156

Open
1 task done
olivierbeauve opened this issue Aug 29, 2024 · 0 comments
Open
1 task done

Duplicate code in the "_gen.go" file #156

olivierbeauve opened this issue Aug 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@olivierbeauve
Copy link

tfplugingen-framework CLI version

tfplugingen-framework module: v0.4.0

Provider Code Spec File

It is very long. Could you generate it using this ?
tfplugingen-openapi generate   --config ./generator_config.yml   --output ./provider-code-spec.json   ./jira_cloud.json

Expected Behavior

Generate a "_gen.go" file without duplicates

Actual Behavior

Many of my generated func() and struct are duplicated in the "_gen.go". As a result, it's impossible to do “go install .” because there are too many errors in the "_gen.go" file.

Additional Information

API used (json file):
https://developer.atlassian.com/cloud/jira/platform/swagger-v3.v3.json

generator config:
provider:
name: jira
resources:
project:
create:
path: /rest/api/3/project
method: POST
read:
path: /rest/api/3/project
method: GET
update:
path: /rest/api/3/project/{projectIdOrKey}
method: PUT
delete:
path: /rest/api/3/project/{projectIdOrKey}
method: DELETE
workflow_scheme:
create:
path: /rest/api/3/workflowscheme
method: POST
read:
path: /rest/api/3/workflowscheme
method: GET
update:
path: /rest/api/3/workflowscheme/update
method: POST
delete:
path: /rest/api/3/workflowscheme/{id}
method: DELETE

For the project resource, it works perfectly, but does not work for the workflow_scheme resource.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@olivierbeauve olivierbeauve added the bug Something isn't working label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant