pub struct UpdateRepoBody {
pub description: Option<String>,
pub name: String,
pub readme: Option<String>,
}Expand description
Request body for PUT /api/v1/u/{owner}/repos/{repo}.
Carries the complete replacement state of the editable repo
fields. PUT semantics: every field is written. To preserve an
existing value, send it back; missing or null for the nullable
fields clears them. Read the current state from GET /repos/{repo}
first if the form doesn’t already have it.
Visibility is NOT editable here — it lives at the sub-resource
/repos/{repo}/visibility for two reasons: (1) it’s a single
well-defined op clients flip independently of content edits, and
(2) Unlisted is system-only and that gate is cleaner to enforce
on its own endpoint.
JSON schema
{
"description": "Request body for `PUT /api/v1/u/{owner}/repos/{repo}`.\n\nCarries the complete replacement state of the editable repo\nfields. PUT semantics: every field is written. To preserve an\nexisting value, send it back; missing or `null` for the nullable\nfields clears them. Read the current state from `GET /repos/{repo}`\nfirst if the form doesn't already have it.\n\nVisibility is NOT editable here — it lives at the sub-resource\n`/repos/{repo}/visibility` for two reasons: (1) it's a single\nwell-defined op clients flip independently of content edits, and\n(2) `Unlisted` is system-only and that gate is cleaner to enforce\non its own endpoint.",
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"description": "New description. Missing or `null` clears the field.",
"type": [
"string",
"null"
]
},
"name": {
"description": "New repository name. Required (the column is non-nullable —\nthere is no \"no name\" state). Renames must be unique among\nthis owner's repos (409 on collision). Renaming changes the\nURL of the repo and every nested resource — clients holding\nold URLs will 404 afterward.",
"type": "string"
},
"readme": {
"description": "New README body (free-form text/Markdown). Missing or `null`\nclears the field. No length cap is enforced at the API layer.",
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}Fields§
§description: Option<String>New description. Missing or null clears the field.
name: StringNew repository name. Required (the column is non-nullable — there is no “no name” state). Renames must be unique among this owner’s repos (409 on collision). Renaming changes the URL of the repo and every nested resource — clients holding old URLs will 404 afterward.
readme: Option<String>New README body (free-form text/Markdown). Missing or null
clears the field. No length cap is enforced at the API layer.
Trait Implementations§
Source§impl Clone for UpdateRepoBody
impl Clone for UpdateRepoBody
Source§fn clone(&self) -> UpdateRepoBody
fn clone(&self) -> UpdateRepoBody
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more