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

springfox swagger 3 annotation @ApiResponse doesn't work #3907

Closed
arthur37231 opened this issue Sep 29, 2021 · 5 comments
Closed

springfox swagger 3 annotation @ApiResponse doesn't work #3907

arthur37231 opened this issue Sep 29, 2021 · 5 comments
Labels

Comments

@arthur37231
Copy link

I'm using the springfox latest version and the maven dependency is

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-boot-starter</artifactId>
    <version>3.0.0</version>
</dependency>

Issue:

Annotations io.swagger.v3.oas.annotations.responses.ApiResponse (@ApiResponse) and io.swagger.v3.oas.annotations.responses.ApiResponses (@ApiResponses) defined in swagger 3.0 are not rendered on the UI page. I checked a similar issue was addressed in an old version in #2767 (comment)

I experimented with the solution on my demo program and it still works. However, the page rendering had no effect if I tried to write it with new annotations provided in 3.0 version.

Below is my imitated solution if my understanding of annotations and attributes is correct.

image

But there is nothing on the corresponding UI page.

image

I have seen @dilipkrish encouraged us to continue to use annotations in the 2.x version because they will be still supported in the new version. But I am curious about how to use the new features to generate API documentation.

In addition, there is almost no tutorial about 3.x new features in the reference doc. This has brought great difficulties to beginners who use the latest version. I hope someone can update it as soon as possible.

@Davide-Di-Do
Copy link

In my honest point of view the project is not active. There are many pull requests that are pending, many issues without response. There is another library that is compatible with this that is called spring-doc. I have not any kind of relation with that project, but I'm trying to help another developer to solve its problems

@arthur37231
Copy link
Author

Hi Davide, can you show me any link to that project you mentioned? I don't mind whether any of you are related to other projects. I'm just a normal developer, so it would be great if it is exactly a helpful tool.

@Davide-Di-Do
Copy link

Hi Artur, here the homepage of the project https://springdoc.org/ and here the specific page of migration from the Springfox annotations to the Springdoc ones https://springdoc.org/#migrating-from-springfox . Let me say that the Springdoc's annotations are more compliant to the OpenAPI documentation and to adhere better to the standards of MicroProfile interfaces.

@stale
Copy link

stale bot commented Dec 29, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 29, 2021
@stale
Copy link

stale bot commented Jan 13, 2022

This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue.

@stale stale bot closed this as completed Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants