Skip to content

OpenAPI spec generation in Java Spring does not prefix endpoints with the RequestMapping #143

Description

@sohitgore

Describe the issue

When trying to generate openAPI spec for a java Spring application using atom and atom-tools,
the endpoints in generated spec are missing the @RequestMapping prefix path
eg.

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private TransactionService transactionService;
    @Autowired
    private BalanceService balanceService;
    @Autowired
    private MailService mailService;
    @Autowired
    private UserService userService;
    @Autowired
    PasswordEncoder passwordEncoded;

    @GetMapping("/balance/{accountNo}")

Here the generated openAPI spec has endpoint /balance/{accountNo}
whereas the actual endpoint should be /user/balance/{accountNo}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions