add openapi docs for new GET /Api/Settings/Version endpoint
This commit is contained in:
parent
327100b249
commit
d5937117c6
1 changed files with 18 additions and 2 deletions
|
|
@ -71,15 +71,19 @@ public class SettingsController(Settings settings, Torrents torrents) : Controll
|
||||||
return Ok(profile);
|
return Ok(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the version of rdt-client the server is running
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The Version Number</returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("Version")]
|
[Route("Version")]
|
||||||
public ActionResult<Version> Version()
|
public ActionResult<Version> Version()
|
||||||
{
|
{
|
||||||
var version = Assembly.GetExecutingAssembly().GetName().Version!;
|
var version = Assembly.GetExecutingAssembly().GetName().Version!;
|
||||||
|
|
||||||
return Ok(new
|
return Ok(new SettingsControllerVersionResponse
|
||||||
{
|
{
|
||||||
Version = version
|
Version = version.ToString()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -319,3 +323,15 @@ public class SettingsControllerTestAria2cConnectionRequest
|
||||||
[Required]
|
[Required]
|
||||||
public String? Secret { get; set; }
|
public String? Secret { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Response model for the version information
|
||||||
|
/// </summary>
|
||||||
|
public class SettingsControllerVersionResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The version number
|
||||||
|
/// </summary>
|
||||||
|
/// <example>v2.0.102</example>
|
||||||
|
public required String? Version { get; set; }
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue