Hello,
I'm trying to use the GitLab openapi spec viewer (which allow to rendre an openapi spec in swagger UI embedded directly within GitLab) for my own API.
I know it's working with GitLab API, but I was wondering if it was possible to make it work with my own API too. Currently, I have a CORS error, any idea of how to make it work so I can test my API directly?
FYI: I'm on gitlab.com
#Make openapi (swagger) gitlab viewer tester (execute) work with non-gitlab APIs
5 messages · Page 1 of 1 (latest)
I'm not sure if that's possible or not - I guess GitLab might only allow it for their own API?
FWIW, I've been using this tool pretty successfully for my own API: https://rapidocweb.com/
It's just JavaScript, so you should be able to deploy it into e.g. GitLab Pages quite easily if that's what you want to do?
RapiDoc is Web Component for viewing Swagger & OpenAPI Spec. Supports themes, styling and various rendering styles
I think it is the opposite, your API needs to allow the browser to make requests to your API while on a gitlab.com page
Ahh, that would also make sense...
I think their is something else because it's working from Swagger Editor (online), but not GitLab
I've already allowed anyHost + anyMethod in my Cors configuration (for testing purposes only), but still GitLab throw me a CORS error, I don't know how I could get more details about the cors error