Since supertokens uses our backend for communicati...
# support-questions-legacy
h
Since supertokens uses our backend for communicating. I need a way to show it in the swagger docs so the developers know that '/auth' is for supertokens. I am using NestJs with swagger decorators and their cli plugin. How do you recommend doing it? Should it be a part of swagger docs or not? If yes then how can we configure it?
r
hey @hamzatrq our middleware adds those APIs dynamically. As such, those APIs won't be added to your swagger docs automatically.
But you can always refer to our swagger docs for fdi instead
supertokens.com/docs/fdi
h
@rp_st thank you for replying but all of the endpoints have authentication enabled. Without proper documentation it would be hard for any developer who hasn't worked with supertokens to work on the project and there isn't any documentation on how to configure swagger in your repo to work with supertokens. For projects that are using supertokens how do they manage this problem?
r
> all of the endpoints have authentication enabled. You mean you are verifying the session for all your endpoints? That's something that you decide and control. I'm a bit confused as to what you are asking here.
h
@rp_st For example I have an articles module that has GET, POST, PATCH and DELETE endpoints. I have a authguard in place (verifySession). But with authguard working and no endpoints for signup and login in the swagger documentation no dev can know how the authentication is working.
I can either write it in description that we are using supertokens and add a link to supertokens swagerhub but then the prefix "/auth" is confusing.
Or a better way would be to somehow show the developer that '/auth/*' endpoints is for supertokens and these are the endpoints
r
Yeaaaa. You could replicate our swagger docs and only pick the endpoints from the recipes you have enabled. Or write a description. Either works.
h
But then there is no guide in debugging section on how to configure Swagger. There is a guide on postman. But swagger is as important as postman
r
Yea.. we don't have that yet unfortunately.
6 Views