예제 #1
0
        public HttpResponseMessage Get(string id)
        {
            // Arrange
            var rootUrl = Request.RequestUri.GetLeftPart(UriPartial.Authority);
            HttpResponseMessage rtnMessage;

            // Act
            if (id.ToLower() == "all")
            {
                var apis = _apiFactory.CreateAllApiDeclarations(rootUrl);
                return(WrapResponse(apis));
            }
            else if (id.ToLower() == "custom")
            {
                return(GetCustomMeta());
            }

            var docs = _apiFactory.CreateApiDeclaration(rootUrl, id);

            return(WrapResponse(docs));
        }