If it’s for mendix for private cloud. I don’t think it’s possible.
Just make sure your API’s are secured.
Maybe you can contact mendix for this.
If you would want to disable the swagger page for a Published REST Service, you could go to the environment details of your app and in the “Network” tab you can add a restriction profile to the path you want to disable. (For instance, /rest-doc/).
Does this answer your question?