using System.Collections.Generic; using Nancy.Metadata.Modules; using Nancy.Metadata.Swagger.Core; using Nancy.Metadata.Swagger.Fluent; namespace Sony.Filtr.AdminAPI.Modules.SpotifySpecific { public class SpotifySearchMetadataModule : MetadataModule { public SpotifySearchMetadataModule() { var tag = "Spotify search"; Describe["GetSearchResults"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Search for all playlists and users from simple search term.", tag) .WithRequestParameter("search", type: "string", description: "The search term to use.", loc: "query", required: true) .WithRequestParameter("limit", type: "string", description: "Limits amount of search hits per type. ", loc: "query", required: false) .WithDefaultResponse()); Describe["GetSearchHistory"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get search result history for user.", tag) .WithRequestParameter("userId", type: "string", description: "The id for the user to get history for.", loc: "query", required: true) .WithRequestParameter("limit", type: "string", description: "Limits amount of results. ", loc: "query", required: false) .WithDefaultResponse>()); Describe["AddSearchHistory"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Add new selected search result for user.", tag) .WithRequestParameter("userId", type: "string", description: "The id for the user to get history for.", loc: "query", required: true) .WithRequestModel(description: "The selected search result and associated info", required: true) .WithDefaultResponse>()); } } }