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

[Snyk] Upgrade org.springdoc:springdoc-openapi-data-rest from 1.7.0 to 1.8.0 #287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anbo-de
Copy link
Member

@anbo-de anbo-de commented Jun 15, 2024

This PR was automatically created by Snyk using the credentials of a real user.


![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)

Snyk has created this PR to upgrade org.springdoc:springdoc-openapi-data-rest from 1.7.0 to 1.8.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 1 version ahead of your current version.

  • The recommended version was released on 3 months ago.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

…1.8.0

Snyk has created this PR to upgrade org.springdoc:springdoc-openapi-data-rest from 1.7.0 to 1.8.0.

See this package in maven:
org.springdoc:springdoc-openapi-data-rest

See this project in Snyk:
https://app.snyk.io/org/anbo-de/project/ee44bfa2-9c74-4e6d-bbb8-fa23594b6bd0?utm_source=github&utm_medium=referral&page=upgrade-pr
@anbo-de anbo-de added the dependencies Pull requests that update a dependency file label Aug 16, 2024
@heinpa
Copy link
Collaborator

heinpa commented Aug 16, 2024

Error after upgrading to springdoc v1.8.0:

[ERROR] testOpenApiDefinitionAvailability  Time elapsed: 0.279 s  <<< ERROR!
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: 'boolean io.swagger.v3.oas.annotations.parameters.RequestBody.useParameterTypeSchema()'
	at eu.wdaqua.qanary.QanaryQuestionAnsweringControllerTest.testOpenApiDefinitionAvailability(QanaryQuestionAnsweringControllerTest.java:154)
Caused by: java.lang.NoSuchMethodError: 'boolean io.swagger.v3.oas.annotations.parameters.RequestBody.useParameterTypeSchema()'
	at eu.wdaqua.qanary.QanaryQuestionAnsweringControllerTest.testOpenApiDefinitionAvailability(QanaryQuestionAnsweringControllerTest.java:154)

=> apparently missing method io.swagger.v3.oas.annotations.parameters.RequestBody.useParameterTypeSchema()

Checking swagger-core versions with mvn dependency:tree:

for 1.7.0

[INFO] +- org.springdoc:springdoc-openapi-data-rest:jar:1.7.0:compile
[INFO] |  +- org.springdoc:springdoc-openapi-hateoas:jar:1.7.0:compile
[INFO] |  |  +- org.springdoc:springdoc-openapi-common:jar:1.7.0:compile
[INFO] |  |  |  \- io.swagger.core.v3:swagger-core:jar:2.2.9:compile

[INFO] +- io.swagger.core.v3:swagger-core-jakarta:jar:2.2.22:compile

for 1.8.0

[INFO] +- org.springdoc:springdoc-openapi-data-rest:jar:1.8.0:compile
[INFO] |  +- org.springdoc:springdoc-openapi-hateoas:jar:1.8.0:compile
[INFO] |  |  +- org.springdoc:springdoc-openapi-common:jar:1.8.0:compile
[INFO] |  |  |  \- io.swagger.core.v3:swagger-core:jar:2.2.20:compile

[INFO] +- io.swagger.core.v3:swagger-core-jakarta:jar:2.2.22:compile

Side-Note: we exclude io.swagger.core.v3:swagger-annotations from openapi dependencies.

Swagger v2.2.9 does not have a method useParameterTypeSchema() (see docs for v2.2.9),
but v2.2.22 does (see docs for v2.2.22 )

@heinpa
Copy link
Collaborator

heinpa commented Aug 16, 2024

solutions for this might also be helpful for #295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants