openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
923 stars 436 forks source link

Add validation schema to `PUT /source/<project>/<package>/<filename>` endpoint #9278

Open dcermak opened 4 years ago

dcermak commented 4 years ago

Issue Description

The API docs for the route PUT /source/<project>/<package>/<filename> (see: https://build.opensuse.org/apidocs/index#72) say that the return type is a status. That is however not true, it is in fact a revisionlist-element from https://build.opensuse.org/apidocs/revisionlist.rng.

Unfortunately that schema doesn't appear to be entirely correct, as I wrote it as a documentation of the GET /source/<project>/<package>/_history route (see https://build.opensuse.org/apidocs/index#57). Actually most of the entries appear to be optional altogether. If someone could clarify which of the elements are actually optional and which are mandatory, then I'll submit a PR for the docs.

eduardoj commented 11 months ago

The API documentation has been migrated to Swagger-UI (see blogpost), and now the return type is a schema defined with the OpenAPI specification. See response 200 in the current documentation.

The endpoint still lacks from a schema definition. The issue still applies. I change the title of the issue.