-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add support for using the ReDoc middleware in native AoT applications. - Add missing test coverage for ReDoc extensions. - Fix some code analysis suggestions. - Fix native AoT test app exception on start-up (see #2951).
- Loading branch information
1 parent
9fa161b
commit 5230198
Showing
9 changed files
with
191 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Swashbuckle.AspNetCore.ReDoc.ReDocOptions.JsonSerializerOptions.get -> System.Text.Json.JsonSerializerOptions | ||
Swashbuckle.AspNetCore.ReDoc.ReDocOptions.JsonSerializerOptions.set -> void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/Swashbuckle.AspNetCore.ReDoc/ReDocOptionsJsonContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#if NET6_0_OR_GREATER | ||
using System; | ||
using System.Text.Json; | ||
using System.Text.Json.Nodes; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Swashbuckle.AspNetCore.ReDoc; | ||
|
||
[JsonSerializable(typeof(ConfigObject))] | ||
// These primitive types are declared for common types that may be used with ConfigObject.AdditionalItems. See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2884. | ||
[JsonSerializable(typeof(bool))] | ||
[JsonSerializable(typeof(byte))] | ||
[JsonSerializable(typeof(sbyte))] | ||
[JsonSerializable(typeof(short))] | ||
[JsonSerializable(typeof(ushort))] | ||
[JsonSerializable(typeof(int))] | ||
[JsonSerializable(typeof(int?))] | ||
[JsonSerializable(typeof(uint))] | ||
[JsonSerializable(typeof(long))] | ||
[JsonSerializable(typeof(ulong))] | ||
[JsonSerializable(typeof(float))] | ||
[JsonSerializable(typeof(double))] | ||
[JsonSerializable(typeof(decimal))] | ||
[JsonSerializable(typeof(char))] | ||
[JsonSerializable(typeof(string))] | ||
[JsonSerializable(typeof(DateTime))] | ||
[JsonSerializable(typeof(DateTimeOffset))] | ||
[JsonSerializable(typeof(TimeSpan))] | ||
[JsonSerializable(typeof(JsonArray))] | ||
[JsonSerializable(typeof(JsonObject))] | ||
[JsonSerializable(typeof(JsonDocument))] | ||
#if NET7_0_OR_GREATER | ||
[JsonSerializable(typeof(DateOnly))] | ||
[JsonSerializable(typeof(TimeOnly))] | ||
#endif | ||
#if NET8_0_OR_GREATER | ||
[JsonSerializable(typeof(Half))] | ||
[JsonSerializable(typeof(Int128))] | ||
[JsonSerializable(typeof(UInt128))] | ||
#endif | ||
[JsonSourceGenerationOptions( | ||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, | ||
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] | ||
internal sealed partial class ReDocOptionsJsonContext : JsonSerializerContext; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters