using System.Collections.Generic; using Filtr.Core.FacebookUsers.Data; using Nancy; using Nancy.Metadata.Modules; using Nancy.Metadata.Swagger.Core; using Nancy.Metadata.Swagger.Fluent; namespace Sony.Filtr.AdminAPI.Modules { public class MarketMetadataModule : MetadataModule { public MarketMetadataModule() { var tag = "Market"; Describe["GetMarkets"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get all markets", tag) .WithDefaultResponse>()); Describe["GetSingleMarket"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get the specified market", tag) .WithRequestParameter("applicationId") .WithDefaultResponse()); Describe["AddMarket"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Add a new market", tag) .WithRequestModel() .WithDefaultResponse()); Describe["UpdateMarket"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get all markets", tag) .WithRequestParameter("applicationId") .WithRequestModel() .WithDefaultResponse()); Describe["DeleteMarket"] = description => new SwaggerRouteMetadata(description).With(c => c.WithDescription("Get all markets", tag) .WithRequestParameter("applicationId") .WithResponse(HttpStatusCode.NoContent, "Market has been removed")); } } }