#Make openapi (swagger) gitlab viewer tester (execute) work with non-gitlab APIs

5 messages · Page 1 of 1 (latest)

fading sable
#

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

lament orchid
#

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?

gaunt lance
#

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

lament orchid
#

Ahh, that would also make sense...

fading sable