Skip to main content

args_api/endpoint/repository/
get_repository_paths.rs

1use serde::{Deserialize, Serialize};
2
3use super::default_ref;
4use crate::{endpoint::Endpoint, resource::repository::RepositoryPathsResource};
5
6pub struct GetRepositoryPaths;
7
8impl Endpoint for GetRepositoryPaths {
9    const PATH: &'static str = "/repository/{owner}/{repo}/paths";
10    const METHOD: http::Method = http::Method::GET;
11
12    type Request = GetRepositoryPathsRequest;
13    type Response = GetRepositoryPathsResponse;
14}
15
16#[derive(ApiRequest, Debug, Serialize, Deserialize)]
17pub struct GetRepositoryPathsRequest {
18    #[serde(default = "default_ref")]
19    pub ref_name: String,
20}
21
22pub type GetRepositoryPathsResponse = RepositoryPathsResource;