Skip to content

Commit

Permalink
Utoipa tag descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
agersant committed Jan 16, 2025
1 parent c46d27a commit d22d68a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/server/doc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use utoipa::openapi::{
security::{ApiKey, ApiKeyValue, HttpAuthScheme, HttpBuilder, SecurityScheme},
tag::TagBuilder,
ComponentsBuilder, ContactBuilder, InfoBuilder, License, OpenApi, OpenApiBuilder,
};

Expand All @@ -17,6 +18,32 @@ pub fn open_api() -> OpenApi {
))
.build(),
)
.tags(Some([
TagBuilder::new()
.name("Collection")
.description(Some("These endpoints provide information about the available songs, albums, artists and genres."))
.build(),
TagBuilder::new()
.name("Media")
.description(Some("These endpoints serve song audio and album covers."))
.build(),
TagBuilder::new()
.name("User Management")
.description(Some("These endpoints can be used to manage or sign in users of this Polaris server."))
.build(),
TagBuilder::new()
.name("File Browser")
.description(Some("These endpoints allow the music collection to be browsed according to its file hierarchy."))
.build(),
TagBuilder::new()
.name("Configuration")
.description(Some("These endpoints allow administrators to manage the server's configuration."))
.build(),
TagBuilder::new()
.name("Playlists")
.description(Some("These endpoints allow users to create, retrieve, update or delete playlists."))
.build(),
]))
.components(Some(
ComponentsBuilder::new()
.security_scheme(
Expand Down

0 comments on commit d22d68a

Please sign in to comment.