Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Docs Generator #12

Closed
wants to merge 17 commits into from
Closed

API Docs Generator #12

wants to merge 17 commits into from

Conversation

jamiebrynes7
Copy link
Contributor

@jamiebrynes7 jamiebrynes7 commented Dec 13, 2018

Okay this is probably ready for a preliminary review.

I've tried to break it down into logical commits, but some parts reference future commits but it should be fine to just look at the API call name and infer what it does. Otherwise it needs a better name!

@jamiebrynes7 jamiebrynes7 changed the title (WIP) API Docs Generator API Docs Generator Jan 16, 2019
{
private static List<string> BlackList = new List<string>
{
"index.xml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a short comment on why this needs to be blacklisted

public static string CompoundNameToRelativePath(string compoundName)
{
var targetNamespace = Options.Instance.TargetNamespace.Replace(".", "::") + "::";
var markdownSplitPath = compoundName.Replace(targetNamespace, "").Split("::")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use string.Empty

/// <returns>The type name.</returns>
public static string GetTypeFromFullyQualified(string fullyQualified)
{
return fullyQualified.Split(".").Reverse().First();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just use Last()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - yes


private static void BuildTableOfContents(DoxygenDatabase database, string outputDirectory)
{
// Build the table of contents at {{outputDirectory}}/.toc/toc.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is the toc just for the API docs right? how would this work together with the rest of the documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and you can use the include macro in the main ToC.


private static void BuildDocs(DoxygenDatabase database, string outputDirectory)
{
foreach (var details in database.TypeDetails)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those loops could potentially be factored out into a method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah agreed.

@jamiebrynes7
Copy link
Contributor Author

Moved to another repo

@jamiebrynes7 jamiebrynes7 deleted the feature/api-docs-generator branch October 21, 2019 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants