using System.Collections.Generic; using Nancy; using Nancy.Metadata.Modules; using Nancy.Metadata.Swagger.Core; using Nancy.Metadata.Swagger.Fluent; using Sony.Filtr.Contracts.Entities; namespace Sony.Filtr.AdminAPI.Modules.SpotifySpecific { public class SpotifyUserCountryMetadataModule : MetadataModule { public SpotifyUserCountryMetadataModule() { var tag = "Spotify User <-> Country"; Describe["GetSpotifyUserCountries"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get all mappings", tag) .WithDefaultResponse>()); Describe["GetSingleSpotifyUserCountryMapping"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get mapping for the user", tag) .WithRequestParameter("username") .WithDefaultResponse()); Describe["AddSpotifyUserCountryMapping"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Add mapping for the user", tag) .WithRequestModel() .WithDefaultResponse()); Describe["UpdateSpotifyUserCountryMapping"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Update mapping for the user", tag) .WithRequestModel() .WithDefaultResponse()); Describe["DeleteSpotifyUserCountryMappingByUsername"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Delete mapping for the user", tag) .WithRequestParameter("username") .WithResponse(HttpStatusCode.NoContent, "Mapping deleted")); Describe["DeleteSpotifyUserCountryMapping"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Update mapping for the user", tag) .WithRequestModel() .WithResponse(HttpStatusCode.NoContent, "Mapping deleted")); } } }