File tree Expand file tree Collapse file tree 4 files changed +24
-20
lines changed Expand file tree Collapse file tree 4 files changed +24
-20
lines changed Original file line number Diff line number Diff line change 1+ pub mod authors;
12pub mod dependencies;
23pub mod downloads;
34pub mod metadata;
Original file line number Diff line number Diff line change 1+ use crate :: controllers:: version:: CrateVersionPath ;
2+ use axum_extra:: json;
3+ use axum_extra:: response:: ErasedJson ;
4+
5+ /// Get crate version authors.
6+ ///
7+ /// This endpoint was deprecated by [RFC #3052](https://github.com/rust-lang/rfcs/pull/3052)
8+ /// and returns an empty list for backwards compatibility reasons.
9+ #[ utoipa:: path(
10+ get,
11+ path = "/api/v1/crates/{name}/{version}/authors" ,
12+ params( CrateVersionPath ) ,
13+ tag = "versions" ,
14+ responses( ( status = 200 , description = "Successful Response" ) ) ,
15+ ) ]
16+ #[ deprecated]
17+ pub async fn get_version_authors ( ) -> ErasedJson {
18+ json ! ( {
19+ "users" : [ ] ,
20+ "meta" : { "names" : [ ] } ,
21+ } )
22+ }
Original file line number Diff line number Diff line change @@ -38,25 +38,6 @@ pub struct VersionUpdateRequest {
3838 version : VersionUpdate ,
3939}
4040
41- /// Get crate version authors.
42- ///
43- /// This endpoint was deprecated by [RFC #3052](https://github.com/rust-lang/rfcs/pull/3052)
44- /// and returns an empty list for backwards compatibility reasons.
45- #[ utoipa:: path(
46- get,
47- path = "/api/v1/crates/{name}/{version}/authors" ,
48- params( CrateVersionPath ) ,
49- tag = "versions" ,
50- responses( ( status = 200 , description = "Successful Response" ) ) ,
51- ) ]
52- #[ deprecated]
53- pub async fn get_version_authors ( ) -> ErasedJson {
54- json ! ( {
55- "users" : [ ] ,
56- "meta" : { "names" : [ ] } ,
57- } )
58- }
59-
6041/// Get crate version metadata.
6142#[ utoipa:: path(
6243 get,
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ pub fn build_axum_router(state: AppState) -> Router<()> {
4040 . routes ( routes ! ( version:: readme:: get_version_readme) )
4141 . routes ( routes ! ( version:: dependencies:: get_version_dependencies) )
4242 . routes ( routes ! ( version:: downloads:: get_version_downloads) )
43- . routes ( routes ! ( version:: metadata :: get_version_authors) )
43+ . routes ( routes ! ( version:: authors :: get_version_authors) )
4444 . routes ( routes ! ( krate:: downloads:: get_crate_downloads) )
4545 . routes ( routes ! ( krate:: versions:: list_versions) )
4646 . routes ( routes ! (
You can’t perform that action at this time.
0 commit comments