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

Upgraded version causing error #9

Open
Shivangi-Sharma-CS opened this issue Oct 18, 2022 · 3 comments
Open

Upgraded version causing error #9

Shivangi-Sharma-CS opened this issue Oct 18, 2022 · 3 comments

Comments

@Shivangi-Sharma-CS
Copy link

Shivangi-Sharma-CS commented Oct 18, 2022

Hello,

I am trying to use the latest Spring project 2.3.7, Java version 17, and swagger generator plugin version 2.19.2. I upgrade all the OpenAPI dependencies to the recent versions. The build fails with this error:

Execution failed for task ':generateSwaggerCodeEStore'.
> Process 'command '/Users/shivangisharma/Library/Java/JavaVirtualMachines/corretto-17.0.4.1/Contents/Home/bin/java'' finished with non-zero exit value 1

Why this might be the case? Are the latest Swagger versions incompatible with SpringBoot?

Also, I have not used Gradle and Swagger before. Is it a prerequisite for this book?

How do we update the project to the latest versions? I am in Chapter 3 of the book.

Thank you,
Your guidance is much appreciated!

@sharmasourabh
Copy link
Collaborator

I assume, you have changed the java version in build.gradle file.
Could you please share your repo? I'll clone and find out.

@NoSoyRo
Copy link

NoSoyRo commented Jan 23, 2024

Hello I am having the same issue, however I am not able yet to solve the error even though I already changed the versions to most recent ones and using java 17, the general cause of the error is the following one:

[main] ERROR i.s.v.p.reference.ReferenceVisitor - Error resolving schema #/components/schemas/Cart java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\home\api\src\main\resources\api\openapi.yaml

Am I missing something? The following is my repo:

https://github.com/NoSoyRo/APIEcommerce/tree/main/ecommerce/api

Thank you very much for the great book you wrote!

@sharmasourabh
Copy link
Collaborator

You may want to refer the new repository that is updated to work with Java 17

https://github.com/PacktPublishing/Modern-API-Development-with-Spring-6-and-Spring-Boot-3

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

No branches or pull requests

3 participants