public void AddBaseTag(Tag baseTag) { _baseTag = baseTag; if (_baseTag != null) { _tagCatalog.AddTag(_baseTag); } }
public ServiceDetailsModule(ISwaggerModelCatalog modelCatalog, ISwaggerTagCatalog tagCatalog) : base("/service") { modelCatalog.AddModel <ServiceOwner>(); modelCatalog.AddModel <Widget>(); tagCatalog.AddTag(new Tag() { Name = ServiceTagName, Description = ServiceTagDescription }); Get("/", _ => GetHome(), null, "ServiceHome"); Get("/details", _ => GetServiceDetails(), null, "GetDetails"); Get("/widgets", _ => GetWidgets(), null, "GetWidgets"); Get("/customers", _ => GetServiceCustomers(), null, "GetCustomers"); //shows massaging multiple query params into single handler parameter. Get("/customerspaged", _ => GetServiceCustomersPaged(GetRequestPaging()), null, "GetCustomersPaged"); Get("/customers/{name}", parameters => GetServiceCustomer(parameters.name), null, "GetCustomer"); Post("/customer/{serviceGuid:guid}", parameters => PostServiceCustomer(parameters.serviceGuid, this.Bind <ServiceCustomer>()), null, "PostNewCustomer"); Post("/customer/{name}/file", parameters => PostCustomerReview(parameters.name, null), null, "PostCustomerReview"); }
public GenericModule(ISwaggerTagCatalog tagCatalog) : base("/generic") { tagCatalog.AddTag(new Tag() { Description = "All response are wrapped in a base class that can include metadata", Name = "Generics" }); Get("/users", _ => GetUsers(), null, "GetUsers"); Post("/users", _ => { var user = this.Bind <User>(); return(PostUser(user)); }); Get("/multi-generics", _ => GetMultipleGenerics(), null, "GetMultipleGenerics"); Get("/multi-nested-generics", _ => GetMultipleNestedGenerics(), null, "GetMultipleNestedGenerics"); }
public ServiceDetailsModule(ISwaggerModelCatalog modelCatalog, ISwaggerTagCatalog tagCatalog) : base("/service") { modelCatalog.AddModel <ServiceOwner>(); tagCatalog.AddTag(new Tag() { Name = ServiceTagName, Description = ServiceTagDescription }); Get("/", _ => GetHome(), null, "ServiceHome"); Get("/details", _ => GetServiceDetails(), null, "GetDetails"); Get("/customers", _ => GetServiceCustomers(), null, "GetCustomers"); Get("/customers/{name}", parameters => GetServiceCustomer(parameters.name), null, "GetCustomer"); Post("/customer/{service}", parameters => PostServiceCustomer(parameters.service, this.Bind <ServiceCustomer>()), null, "PostNewCustomer"); Post("/customer/{name}/file", parameters => PostCustomerReview(parameters.name, null), null, "PostCustomerReview"); }
public ServiceDetailsModule(ISwaggerModelCatalog modelCatalog, ISwaggerTagCatalog tagCatalog) : base("/service") { modelCatalog.AddModel<ServiceOwner>(); tagCatalog.AddTag(new Tag() { Name = ServiceTagName, Description = ServiceTagDescription }); Get("/", _ => GetHome(), null, "ServiceHome"); Get("/details", _ => GetServiceDetails(), null, "GetDetails"); Get("/customers", _ => GetServiceCustomers(), null, "GetCustomers"); Get("/customers/{name}", parameters => GetServiceCustomer(parameters.name), null, "GetCustomer"); Post("/customer/{service}", parameters => PostServiceCustomer(parameters.service, this.Bind<ServiceCustomer>()), null, "PostNewCustomer"); }