cloudapi: add support for mirrorlist and metalink repos
Previously, baseurl was required in openapi.yaml. In order to add support for metalink and mirrorlist repos as well, make all optional, since openapi does not support mutually exclusive parameters. Instead, enforce this logic in server.go, and if no repo has been specified, return a 400 bad request error.
This commit is contained in:
parent
69e7883421
commit
6388aaff4c
3 changed files with 25 additions and 6 deletions
|
|
@ -135,15 +135,22 @@ components:
|
|||
Repository:
|
||||
type: object
|
||||
required:
|
||||
- baseurl
|
||||
- rhsm
|
||||
properties:
|
||||
rhsm:
|
||||
type: boolean
|
||||
baseurl:
|
||||
type: string
|
||||
format: url
|
||||
example: 'https://cdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os/'
|
||||
rhsm:
|
||||
type: boolean
|
||||
mirrorlist:
|
||||
type: string
|
||||
format: url
|
||||
example: 'https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-33&arch=x86_64'
|
||||
metalink:
|
||||
type: string
|
||||
format: url
|
||||
example: 'https://mirrors.fedoraproject.org/metalink?repo=fedora-32&arch=x86_64'
|
||||
UploadRequest:
|
||||
type: object
|
||||
required:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue