Skip to content

New Swagger API doc

Saray Cabrera Padrón edited this page Oct 4, 2022 · 13 revisions

New OBS API Documentation

We are rewriting our documentation using Swagger.

As a guide, we are using: https://swagger.io/docs/specification/about/

The main configuration file is here: https://github.com/openSUSE/open-build-service/blob/master/src/api/public/apidocs-new/OBS-v2.10.50.yaml

How to test it

Start the development environment and point your browser to http://localhost:3000/apidocs-new/index.html

In the development environment, when you introduce some changes in the API documentation you won't see them applied after refreshing the page. That is related to cache and this is our workaround:

How to update

CAVEATS

Some people experience problems with Swagger and Rails, specially when a file get changed, either Rails doesn't reload it or browser caches it. To the second issue, normally running the browser in incognito/private mode helps. In Chrome, disabling the cache under the Network tab in the developer tools also helps.

Clone this wiki locally