Skip to content

Commit

Permalink
Document PUT /source/{project_name}/{package_name}/{file_name}
Browse files Browse the repository at this point in the history
  • Loading branch information
ncounter committed Mar 17, 2023
1 parent a3e0ee2 commit 4ff4b0a
Showing 1 changed file with 75 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,78 @@ delete:
$ref: '../components/responses/unknown_project_or_package_or_file.yaml'
tags:
- Sources - Files

put:
summary: Write a specified source file into a package.
description: Write a specified source file of a package of a project.
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/project_name.yaml'
- $ref: '../components/parameters/package_name.yaml'
- $ref: '../components/parameters/file_name.yaml'
- in: query
name: rev
schema:
type: string
description: |
If set to 'upload', multiple files can be uploaded in just one commit.
Upload first the files with `rev=upload`, then close the single commit by another request call with `cmd=commit`
example: upload
- in: query
name: meta
schema:
type: integer
enum:
- 1
- 0
description: Set to `1` to write meta data instead of sources.
example: 1
- in: query
name: comment
schema:
type: string
description: A comment that will appear in the package's comment section explaining the reason behind the creation of the new file.
example: Added new configuration file.
- in: query
name: keeplink
schema:
type: string
enum:
- 1
- 0
default: 0
description: Set to `1` to preserve the link (`_link` file) on the source.
example: 1
requestBody:
content:
plain/text:
schema:
type: string
properties:
file:
type: string
format: binary
responses:
'200':
description:
Updates the artifact's file contents
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/revision.yaml'
example:
rev: 28
vrev: 28
srcmd5: 2e0bd85c089953743bd30eeacf70989b
version: 1
time: 1678787266
user: Admin
comment:
requestid:
'401':
$ref: '../components/responses/unauthorized.yaml'
'404':
$ref: '../components/responses/unknown_project_or_package_or_file.yaml'
tags:
- Sources - Files

0 comments on commit 4ff4b0a

Please sign in to comment.