From 968186fcf7c0943db32899b6a7ca0d518cff9680 Mon Sep 17 00:00:00 2001 From: Dany Marcoux Date: Wed, 20 Jan 2021 15:57:38 +0100 Subject: [PATCH] Document GET configuration in the API new documentation --- src/api/public/apidocs-new/OBS-v2.10.50.yaml | 4 ++ .../components/schemas/configuration.yaml | 72 +++++++++++++++++++ .../apidocs-new/paths/configuration.yaml | 18 +++++ 3 files changed, 94 insertions(+) create mode 100644 src/api/public/apidocs-new/components/schemas/configuration.yaml create mode 100644 src/api/public/apidocs-new/paths/configuration.yaml diff --git a/src/api/public/apidocs-new/OBS-v2.10.50.yaml b/src/api/public/apidocs-new/OBS-v2.10.50.yaml index f036cb761df..40e62bd12c7 100644 --- a/src/api/public/apidocs-new/OBS-v2.10.50.yaml +++ b/src/api/public/apidocs-new/OBS-v2.10.50.yaml @@ -11,6 +11,7 @@ tags: - name: Attribute Namespaces - name: Attributes - name: Request + - name: Configuration info: description: Open Build Service API @@ -44,6 +45,9 @@ paths: /attribute/{namespace}/{attribute_name}/_meta: $ref: 'paths/attribute_namespace_attribute_name_meta.yaml' + /configuration: + $ref: 'paths/configuration.yaml' + /group: $ref: 'paths/group.yaml' /group/{group_title}: diff --git a/src/api/public/apidocs-new/components/schemas/configuration.yaml b/src/api/public/apidocs-new/components/schemas/configuration.yaml new file mode 100644 index 00000000000..85515c113a6 --- /dev/null +++ b/src/api/public/apidocs-new/components/schemas/configuration.yaml @@ -0,0 +1,72 @@ +type: object +properties: + title: + type: string + example: Open Build Service + description: + type: string + example: The openSUSE Build Service is the public instance of the Open Build Service (OBS) + name: + type: string + example: private + download_on_demand: + type: string + example: on + enforce_project_keys: + type: string + example: off + anonymous: + type: string + example: on + registration: + type: string + example: allow + default_access_disabled: + type: string + example: off + allow_user_to_create_home_project: + type: string + example: on + disallow_group_creation: + type: string + example: off + change_password: + type: string + example: on + obs_url: + type: string + example: 'https://unconfigured.openbuildservice.org' + hide_private_options: + type: string + example: off + gravatar: + type: string + example: on + cleanup_empty_projects: + type: string + example: on + disable_publish_for_branches: + type: string + example: on + admin_email: + type: string + example: unconfigured@openbuildservice.org + unlisted_projects_filter: + type: string + example: '^home:.+' + unlisted_projects_filter_description: + type: string + example: home projects + schedulers: + type: object + properties: + arch: + type: array + items: + type: string + example: + - armv7l + - i586 + - x86_64 +xml: + name: configuration diff --git a/src/api/public/apidocs-new/paths/configuration.yaml b/src/api/public/apidocs-new/paths/configuration.yaml new file mode 100644 index 00000000000..8db79f73840 --- /dev/null +++ b/src/api/public/apidocs-new/paths/configuration.yaml @@ -0,0 +1,18 @@ +get: + summary: Display the configuration of this Open Build Service instance + description: | + Display the configuration of this Open Build Service instance. + security: + - basic_authentication: [] + responses: + '200': + description: > + OK. The request has succeeded. + content: + application/xml; charset=utf-8: + schema: + $ref: '../components/schemas/configuration.yaml' + '401': + $ref: '../components/responses/unauthorized.yaml' + tags: + - Configuration