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

Springdoc programatically dynamic API definition and display it's properties #2588

Open
PauloSolis opened this issue May 5, 2024 · 0 comments

Comments

@PauloSolis
Copy link

PauloSolis commented May 5, 2024

  • My application is working with spring, not springboot and has a way of creating dynamic components, so the list of a specific path will be increasing it's differences. I'm trying to build programmatically the results for all of them. With the specific parameters and requests, so it can work to try the HTTP calls in one page

It's something similar to what this guy is doing and the closest solution I found, but there are some specific things on his guide that I'm not aware of that, like the way he gets the path or the schemas.

https://medium.com/@moh.hasan.muktasyim.billah/modify-swagger-to-show-dynamic-api-based-on-config-using-springdoc-openapi-647309280a29

When I go to /swagger-ui/index.html it displaying all path correctly, but two types not so there are two points.

  1. I want to specify the dynamic paths like the guy in the link above /api/test/**
  2. For those which are shown /api/doc/{ver}/{param} replace the parameters with their current path

I tried to use addOpenApiCustomiser() and pathsToMatch() to retrieve the data and juts add them to the list but I'm not able to retrieve any information using .getComponents().getEtc() is it possible? because the other option would be to map every value manually

@PauloSolis PauloSolis changed the title Springdoc programatically API definition and display Springdoc programatically dynamic API definition and display it's properties May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant