using System; using System.Collections.Generic; using Nancy.Metadata.Modules; using Nancy.Metadata.Swagger.Core; using Nancy.Metadata.Swagger.Fluent; using Nancy.Routing; using Sony.Filtr.Search; using Sony.Filtr.Search.SearchItems; namespace Sony.Filtr.AdminAPI.Modules.EditorialPlaylist { public class EditorialPlaylistSearchMetadataModule : MetadataModule { public EditorialPlaylistSearchMetadataModule() { Describe["PlaylistSearchPost"] = GetSearchEndpointDescription(); Describe["PlaylistSearch"] = GetSearchEndpointDescription(); } private static Func GetSearchEndpointDescription() { return desc => new SwaggerRouteMetadata(desc).With(c=> c.WithDescription("Endpoint for searching for playlists. Currently it is possible to search by freetext searchQuery, servicetype, username of owner of playlist, countryCode, which buzz category the owning user belongs to and search by tag or artists.", tags: "Editorial Playlist Search") .WithRequestModel() .WithDefaultResponse>() ); } } }