question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Springfox creates model ends with suffix _1

See original GitHub issue

Please take the time to search the repository, if your question has already been asked or answered.

  • What version of the library are you using? Is it the latest version? The latest released version is Download 3.0.0-SNAPSHOT, springfox-core-3.0.0-20200106.122158-51

What kind of issue is this?

  • Question. Is this a question about how to do a certain thing?

  • Bug report. If you’ve found a bug, spend the time to write a failing test. Bugs with tests or steps to reproduce get fixed faster. Here’s an example: https://gist.github.com/swankjesse/6608b4713ad80988cdc9

    • spring xml/java config that is relevant
    • springfox specific configuration if it makes sense
    • include any output you’ve received; logs, json snippets etc.; and what the expected output should be
    • if you have a repo that demonstrates the issue for bonus points! See this example
  • Feature Request. Start by telling us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.

Please do consider starring this repository if you do like this project and find it useful.


Hello, I am using springfox 3.0.0-SNAPSHOT with spring webflux. I’ve found that the swagger generates the model ends with suffix _1, _2… like below in some cases. screenshot (I’ve seen #3014 also has similar issue. But this this is not the case when using JPA and the issue still exists even after the fixed PR get merged.

The case I met was when using org.springframework.data.domain.Page and it seems getPageable() does matter.

default Pageable getPageable() {
	return PageRequest.of(getNumber(), getSize(), getSort());
}

Here’s the sample repository where I reproduce the issue (https://github.com/jyeoniii/swagger-webflux-sample) Could you take a look at it?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MaksimOrlovcommented, Feb 8, 2020

Here is the PR #3247 to fix this issue.

1reaction
jyeoniiicommented, Jan 31, 2020

Also, I have an additional question. While debugging it, I saw the registerType() and registerUniqueType() method in UniqueTypeNameAdapter. What makes the difference between them?

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Spring Boot 2.6.0 / Spring fox 3 - Failed to start bean ...
This problem's caused by a bug in Springfox. It's making an assumption about how Spring MVC is set up that doesn't always hold...
Read more >
Springfox Reference Documentation - GitHub Pages
Springfox works by examining an application, once, at runtime to infer API semantics based on spring configurations, class structure and various ...
Read more >
[Solved]-Is there a way I can stop springfox swagger from ...
There is a way to prevent Sprinfox framework from generating a Swagger model or parameter information of specified ignored types. You have to...
Read more >
Springfox Swagger 2 for Spring RESTful Web Services
As a first step, Lets quickly create our REST endpoints for our Employee management system. Creating table. Create EMPLOYEE Table, simply Copy ...
Read more >
Customizing your auto-generated Swagger Definitions in 1.5.x
Let's have a quick look at these to see how they can help you provide more complete API metadata when using a bottom-up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found