@@ -49,7 +49,7 @@ pub async fn root() -> impl Responder {
4949 path = "/modrinth/v2/search" ,
5050 params(
5151 ( "query" = Option <String >, Query , description = "Search query" , example = "sodium" ) ,
52- ( "facets" = Option <String >, Query , description = "Facets to filter results" , example = "[[' categories:forge' ],[' versions:1.17.1' ],[' project_type:mod' ],[' license:mit' ]]" ) ,
52+ ( "facets" = Option <String >, Query , description = "Facets to filter results" , example = "[[\" categories:forge\" ],[\" versions:1.17.1\" ],[\" project_type:mod\" ],[\" license:mit\" ]]" ) ,
5353 ( "offset" = Option <i32 >, Query , description = "Offset for pagination" , example = "0" ) ,
5454 ( "limit" = Option <i32 >, Query , description = "Limit for pagination" , example = "10" ) ,
5555 ( "index" = Option <String >, Query , description = "Index to sort" , example = "relevance" )
@@ -123,7 +123,7 @@ pub async fn search_cached(
123123 get,
124124 path = "/modrinth/v2/project/{project_id}" ,
125125 params(
126- ( "project_id" = String , Path , description = "ID of the game to filter project" ) ,
126+ ( "project_id" = String , Path , description = "ID of the game to filter project" , example = "sodium" ) ,
127127 ) ,
128128 responses(
129129 ( status = 200 , description = "Project found" , body = Project )
@@ -147,7 +147,7 @@ pub async fn get_project(
147147 get,
148148 path = "/modrinth/v2/projects" ,
149149 params(
150- ( "ids" = String , Query , description = "The IDs and/or slugs of the projects" , example = "['AABBCCDD', 'EEFFGGHH]' " )
150+ ( "ids" = String , Query , description = "The IDs and/or slugs of the projects" , example = "[\" sodium \" , \" fabric-api \" ] " )
151151 ) ,
152152 responses(
153153 ( status = 200 , description = "Projects Found" , body = Vec <Project >) ,
@@ -177,7 +177,7 @@ pub async fn get_projects(
177177 get,
178178 path = "/modrinth/v2/project/{project_id}/version" ,
179179 params(
180- ( "project_id" = String , Path , description = "ID or slug of the project" )
180+ ( "project_id" = String , Path , description = "ID or slug of the project" , example = "sodium" )
181181 ) ,
182182 responses(
183183 ( status = 200 , description = "Project versions found" , body = Vec <Version >)
@@ -218,7 +218,7 @@ pub async fn get_project_versions(
218218 get,
219219 path = "/modrinth/v2/version/{version_id}" ,
220220 params(
221- ( "version_id" = String , Path , description = "ID of the version" )
221+ ( "version_id" = String , Path , description = "ID of the version" , example = "ygf8cVZg" )
222222 ) ,
223223 responses(
224224 ( status = 200 , description = "Version found" , body = Version )
@@ -242,7 +242,7 @@ pub async fn get_version(
242242 get,
243243 path = "/modrinth/v2/versions" ,
244244 params(
245- ( "ids" = String , Query , description = "The IDs of the versions" , example = "['AABBCCDD', 'EEFFGGHH]' " )
245+ ( "ids" = String , Query , description = "The IDs of the versions" , example = "[\" RncWhTxD \" , \" ygf8cVZg \" ] " )
246246 ) ,
247247 responses(
248248 ( status = 200 , description = "Versions found" , body = Vec <Version >)
@@ -272,8 +272,8 @@ pub async fn get_versions(
272272 get,
273273 path = "/modrinth/v2/version_file/{hash}" ,
274274 params(
275- ( "hash" = String , Path , description = "Hash of the file, sha1 or sha512" ) ,
276- ( "algorithm" = String , Query , description = "Hash algorithm used, sha1 or sha512" )
275+ ( "hash" = String , Path , description = "Hash of the file, sha1 or sha512" , example = "d67e66ea4bb2409997b636dae4203d33764cdcc8" ) ,
276+ ( "algorithm" = String , Query , description = "Hash algorithm used, sha1 or sha512" , example = "sha1" )
277277 ) ,
278278 responses(
279279 ( status = 200 , description = "File found" , body = Version )
@@ -327,8 +327,8 @@ pub async fn get_version_files(
327327 path = "/modrinth/v2/version_file/{hash}/update" ,
328328 request_body = UpdateItems ,
329329 params(
330- ( "hash" = String , Path , description = "Hash of the file, sha1 or sha512" ) ,
331- ( "algorithm" = String , Query , description = "Hash algorithm used, sha1 or sha512" )
330+ ( "hash" = String , Path , description = "Hash of the file, sha1 or sha512" , example = "d67e66ea4bb2409997b636dae4203d33764cdcc8" ) ,
331+ ( "algorithm" = String , Query , description = "Hash algorithm used, sha1 or sha512" , example = "sha1" )
332332 ) ,
333333 responses(
334334 ( status = 200 , description = "File updated" , body = Version )
@@ -361,6 +361,7 @@ pub async fn update_version_file(
361361#[ utoipa:: path(
362362 post,
363363 path = "/modrinth/v2/version_files/update" ,
364+ request_body = MultiUpdateItems ,
364365 responses(
365366 ( status = 200 , description = "Versions Found" , body = Vec <Version >)
366367 ) ,
0 commit comments