-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document endpoint to get package's attributes
Endpoint: source/{project_name}/{package_name}/_attribute
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
src/api/public/apidocs-new/paths/source_project_name_package_name_attribute.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
get: | ||
summary: List the attibutes of a package | ||
parameters: | ||
- $ref: '../components/parameters/project_name.yaml' | ||
- $ref: '../components/parameters/package_name.yaml' | ||
# Query Strings: | ||
# `meta`: either you pass `meta` or not, it's always replaced by meta: 1. | ||
- name: rev | ||
in: query | ||
schema: | ||
type: string | ||
description: | | ||
Passing the number of the revision, this endpoint displays the attributes' XML as it was at that point. | ||
example: 3 | ||
- name: view | ||
in: query | ||
schema: | ||
type: string | ||
enum: | ||
- blame | ||
description: With `view=blame`, information about who changed each XML tag and when is displayed. | ||
example: blame | ||
- name: with_default | ||
in: query | ||
schema: | ||
type: string | ||
description: | | ||
If the attribute doesn't contain any value and `with_default` is present, | ||
the default values will be displayed, if any. | ||
example: 1 | ||
- name: with_project | ||
in: query | ||
schema: | ||
type: string | ||
description: | | ||
Passing `with_project`, the response displays the attributes of the package's project in addition to the package ones. | ||
example: 1 | ||
responses: | ||
'200': | ||
description: OK. The request has succeeded. | ||
content: | ||
application/xml; charset=utf-8: | ||
schema: | ||
$ref: '../components/schemas/source/attributes.yaml' | ||
examples: | ||
manyAttributes: | ||
value: | ||
- name: MaintenanceProject | ||
namespace: OBS | ||
- name: ScreenShots | ||
namespace: OBS | ||
viewBlame: | ||
description: Passing `view=blame`. | ||
value: | | ||
10 (Admin 2023-03-09 11:46:01 1) <attributes> | ||
12 (Iggy 2023-03-13 14:46:01 5) <attribute namespace="OBS" name="MakeOriginOlder"/> | ||
14 (Admin 2023-03-13 15:14:21 6) <attribute namespace="OBS" name="QualityCategory"> | ||
14 (Admin 2023-03-13 15:14:21 7) <value>Development</value> | ||
14 (Admin 2023-03-13 15:14:21 8) </attribute> | ||
10 (Admin 2023-03-09 11:46:01 9) </attributes> | ||
'400': | ||
description: Bad Request. | ||
content: | ||
application/xml; charset=utf-8: | ||
schema: | ||
$ref: '../components/schemas/api_response.yaml' | ||
examples: | ||
remoteProject: | ||
value: | ||
code: remote_project | ||
summary: Attribute access to remote project is not yet supported | ||
'401': | ||
$ref: '../components/responses/unauthorized.yaml' | ||
'404': | ||
$ref: '../components/responses/unknown_project_or_package.yaml' | ||
tags: | ||
- Sources - Packages |