Browse Source

Fix build errors

master
NGnius 4 years ago
parent
commit
d2e3da7835
2 changed files with 14 additions and 9 deletions
  1. +8
    -3
      src/apis/repository_api.rs
  2. +6
    -6
      src/models/repository.rs

+ 8
- 3
src/apis/repository_api.rs View File

@@ -1,10 +1,10 @@
/*
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* OpenAPI spec version: 1.1.1
*
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

@@ -6096,7 +6096,12 @@ impl<C: hyper::client::Connect>RepositoryApi for RepositoryApiClient<C> {
query.append_pair("state", &state.to_string());
query.append_pair("sort", &sort.to_string());
query.append_pair("milestone", &milestone.to_string());
query.append_pair("labels", &labels.join(",").to_string());
let mut label_str = "".to_owned();
for label in labels {
label_str += &label.to_string();
label_str += ",";
}
query.append_pair("labels", &label_str[..label_str.chars().count()-1].to_string());
for (key, val) in &auth_query {
query.append_pair(key, val);
}


+ 6
- 6
src/models/repository.rs View File

@@ -1,10 +1,10 @@
/*
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* OpenAPI spec version: 1.1.1
*
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

@@ -74,7 +74,7 @@ pub struct Repository {
#[serde(rename = "owner")]
owner: Option<::models::User>,
#[serde(rename = "parent")]
parent: Option<::models::Repository>,
parent: Option<Box<::models::Repository>>,
#[serde(rename = "permissions")]
permissions: Option<::models::Permission>,
#[serde(rename = "private")]
@@ -638,15 +638,15 @@ impl Repository {
}

pub fn set_parent(&mut self, parent: ::models::Repository) {
self.parent = Some(parent);
self.parent = Some(Box::new(parent));
}

pub fn with_parent(mut self, parent: ::models::Repository) -> Repository {
self.parent = Some(parent);
self.parent = Some(Box::new(parent));
self
}

pub fn parent(&self) -> Option<&::models::Repository> {
pub fn parent(&self) -> Option<&Box<::models::Repository>> {
self.parent.as_ref()
}