From 826463303b5cba2c12a8c6d24f24b37c04e94f94 Mon Sep 17 00:00:00 2001 From: dvolper Date: Tue, 7 May 2024 12:19:34 +0200 Subject: [PATCH] generate docs --- .gitignore | 2 + .../Doki.Output.Json.JsonOutput.md | 37 +++++++++++++++++++ .../Doki.Output.Json.JsonOutputExtensions.md | 27 ++++++++++++++ .../Doki.Output.Json/README.md | 8 ++++ docs/api/Doki.Output.Json/README.md | 9 +++++ docs/api/README.md | 4 ++ doki.config.json | 10 ++++- src/Doki.Abstractions/DocumentationObject.cs | 5 ++- 8 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 docs/api/Doki.Output.Json/Doki.Output.Json/Doki.Output.Json.JsonOutput.md create mode 100644 docs/api/Doki.Output.Json/Doki.Output.Json/Doki.Output.Json.JsonOutputExtensions.md create mode 100644 docs/api/Doki.Output.Json/Doki.Output.Json/README.md create mode 100644 docs/api/Doki.Output.Json/README.md diff --git a/.gitignore b/.gitignore index 104b544..2211e3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +docs/json + ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## diff --git a/docs/api/Doki.Output.Json/Doki.Output.Json/Doki.Output.Json.JsonOutput.md b/docs/api/Doki.Output.Json/Doki.Output.Json/Doki.Output.Json.JsonOutput.md new file mode 100644 index 0000000..ca0be22 --- /dev/null +++ b/docs/api/Doki.Output.Json/Doki.Output.Json/Doki.Output.Json.JsonOutput.md @@ -0,0 +1,37 @@ +[Packages](../../README.md) / [Doki.Output.Json](../README.md) / [Doki.Output.Json](README.md) / + +# JsonOutput Class + +## Definition + +Namespace: [Doki.Output.Json](README.md) + +Assembly: [Doki.Output.Json.dll](../README.md) + +Package: [Doki.Output.Json](https://www.nuget.org/packages/Doki.Output.Json) + +--- + +```csharp +public sealed class JsonOutput : Doki.Output.IOutput +``` + +Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → JsonOutput + +Implements: [IOutput](../../Doki.Output.Abstractions/Doki.Output/Doki.Output.IOutput.md) + +## Constructors + +| |Summary| +|---|---| +|JsonOutput(Doki.Output.OutputOptions<Doki.Output.Json.JsonOutput>)|| + + +## Methods + +| |Summary| +|---|---| +|BeginAsync(System.Threading.CancellationToken)|| +|WriteAsync(Doki.DocumentationRoot, System.Threading.CancellationToken)|| + + diff --git a/docs/api/Doki.Output.Json/Doki.Output.Json/Doki.Output.Json.JsonOutputExtensions.md b/docs/api/Doki.Output.Json/Doki.Output.Json/Doki.Output.Json.JsonOutputExtensions.md new file mode 100644 index 0000000..3ad497e --- /dev/null +++ b/docs/api/Doki.Output.Json/Doki.Output.Json/Doki.Output.Json.JsonOutputExtensions.md @@ -0,0 +1,27 @@ +[Packages](../../README.md) / [Doki.Output.Json](../README.md) / [Doki.Output.Json](README.md) / + +# JsonOutputExtensions Class + +## Definition + +Namespace: [Doki.Output.Json](README.md) + +Assembly: [Doki.Output.Json.dll](../README.md) + +Package: [Doki.Output.Json](https://www.nuget.org/packages/Doki.Output.Json) + +--- + +```csharp +public static class JsonOutputExtensions +``` + +Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → JsonOutputExtensions + +## Methods + +| |Summary| +|---|---| +|AddMarkdownOutput(Microsoft.Extensions.DependencyInjection.IServiceCollection)|| + + diff --git a/docs/api/Doki.Output.Json/Doki.Output.Json/README.md b/docs/api/Doki.Output.Json/Doki.Output.Json/README.md new file mode 100644 index 0000000..765d954 --- /dev/null +++ b/docs/api/Doki.Output.Json/Doki.Output.Json/README.md @@ -0,0 +1,8 @@ +# Doki.Output.Json Namespace + +## Types + +- [JsonOutput](Doki.Output.Json.JsonOutput.md) +- [JsonOutputExtensions](Doki.Output.Json.JsonOutputExtensions.md) + + diff --git a/docs/api/Doki.Output.Json/README.md b/docs/api/Doki.Output.Json/README.md new file mode 100644 index 0000000..ae07746 --- /dev/null +++ b/docs/api/Doki.Output.Json/README.md @@ -0,0 +1,9 @@ +# Doki.Output.Json + +Doki JSON Generator + +## Namespaces + +- [Doki.Output.Json](Doki.Output.Json/README.md) + + diff --git a/docs/api/README.md b/docs/api/README.md index 62f85f4..01b3d0c 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -16,6 +16,10 @@ Doki Output Extensions +- [Doki.Output.Json](Doki.Output.Json/README.md) + + Doki JSON Generator + - [Doki.Output.Markdown](Doki.Output.Markdown/README.md) Doki Markdown Generator diff --git a/doki.config.json b/doki.config.json index b1ea94f..e138fa3 100644 --- a/doki.config.json +++ b/doki.config.json @@ -2,8 +2,7 @@ "$schema": "src/Doki.CommandLine/doki.config.schema.json", "input": [ "src/**/*.csproj", - "!src/Doki.CommandLine/Doki.CommandLine.csproj", - "!src/Doki.Documentation.Content/Doki.Documentation.Content.csproj" + "!src/Doki.CommandLine/Doki.CommandLine.csproj" ], "output": [ { @@ -12,6 +11,13 @@ "options": { "outputPath": "docs/api" } + }, + { + "type": "Doki.Output.Json", + "from": "src/Doki.Output.Json/Doki.Output.Json.csproj", + "options": { + "outputPath": "docs/json" + } } ] } \ No newline at end of file diff --git a/src/Doki.Abstractions/DocumentationObject.cs b/src/Doki.Abstractions/DocumentationObject.cs index 2012a65..8ff3f38 100644 --- a/src/Doki.Abstractions/DocumentationObject.cs +++ b/src/Doki.Abstractions/DocumentationObject.cs @@ -1,4 +1,6 @@ -namespace Doki; +using System.Text.Json.Serialization; + +namespace Doki; /// /// Represents a documentation object. @@ -13,6 +15,7 @@ public abstract record DocumentationObject /// /// Gets the parent of the documentation object. /// + [JsonIgnore] public DocumentationObject? Parent { get; internal init; } ///