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

[BUG][GRADLE] When the open-api-specification is changed for the schemas referred via $ref, gradle task "GenerateTask" does not detect the changes. #16723

Closed
DeepikaSridhar2112 opened this issue Oct 4, 2023 · 0 comments

Comments

@DeepikaSridhar2112
Copy link
Contributor

DeepikaSridhar2112 commented Oct 4, 2023

Issue Description:
When changes are made to open-api-schemas referred via the $ref keyword, gradle is unable to detect the changes made to the schema.
However,gradle is able to detect changes for schema changes provided directly in openapi.yml .

Link to a sample project which recreates the issue can be found at
https://github.com/DeepikaSridhar2112/open-api-issue

Versions used:
openapi-generator
7.0.1
Gradle
7.5.1

Steps to reproduce:
https://github.com/DeepikaSridhar2112/open-api-issue contains sampler project to recreate the issue. In the sample, schema is being defined via searchResults.yml.When changes are made to searchResult.yml
and openApiGenerate task is invoked, the generated code doesnt reflect the schema changes

Suggested fix:
The openApiTask is unaware of the schema location,. Adding it as an input argument in GenerateTask fixes this refresh issue.

Link to the PR to fix the issue #16735

@DeepikaSridhar2112 DeepikaSridhar2112 changed the title [BUG][GRADLE] While the open-api-specification is changed for the schemas referred via $ref, gradle task "GenerateTask" does not detect the changes and returns the cached result. [BUG][GRADLE] While the open-api-specification is changed for the schemas referred via $ref, gradle task "GenerateTask" does not detect the changes. Oct 4, 2023
@DeepikaSridhar2112 DeepikaSridhar2112 changed the title [BUG][GRADLE] While the open-api-specification is changed for the schemas referred via $ref, gradle task "GenerateTask" does not detect the changes. [BUG][GRADLE] When the open-api-specification is changed for the schemas referred via $ref, gradle task "GenerateTask" does not detect the changes. Oct 4, 2023
DeepikaSridhar2112 pushed a commit to DeepikaSridhar2112/openapi-generator that referenced this issue Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant