0

In a big system, where there are an api for lots of resources, I want split documentation in some configured manner.

Like if they were different apis.

So in main page of web api I have a list of configured 'resources'.

Let's say: Managing contacts [Here i want to expose the 'contact' resource, the 'address' resource, etc. Managing orders [product resource, order resource, delivery resource, balance resource, etc] Managing products [product resource, category resource, etc]

So it's easier for api consumers to understand based on the task to accomplish which methods should been taken care of.

Also, as you can see, different sections use same resources, that means if I change something on the Product resource, both documentations should (ideally) be automatically updated, including versioning info, etc.

EDIT:

    public ActionResult Index()
    {
        ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider();
        return View(Configuration.Services.GetApiExplorer().ApiDescriptions);
    }

this is my index action on helpcontroller, not sure what you mean.

1 Answer 1

1

Have you looked at HelpController under Areas\HelpPage\Controllers? If you notice the Index action of this controller displays information about all controllers. If each of your resource is represented by a controller, you should be able to filter the ApiDescription to only show only the resources that you like to.

Sign up to request clarification or add additional context in comments.

2 Comments

not sure what you mean, i edited the question with my index action.
As you can notice this index action returns all ApiDescription of all controllers or resources in your case. You can filter these descriptions to only show controllers which you would like to show.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.