-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduction of Qowaiv.OpenApi.DataAnnotations
- Loading branch information
Showing
12 changed files
with
68 additions
and
3 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
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
2 changes: 1 addition & 1 deletion
2
src/Qowaiv.CodeGeneration.SingleValueObjects/Qowaiv.CodeGeneration.SingleValueObjects.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace Qowaiv.OpenApi.DataAnnotations; | ||
|
||
/// <summary>Specifies the involved sub schema's of which all should be picked.</summary> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] | ||
public sealed class AllOfAttribute(params string[] schemas) : SubSchemasAttribute(schemas) { } |
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,5 @@ | ||
namespace Qowaiv.OpenApi.DataAnnotations; | ||
|
||
/// <summary>Specifies the involved sub schema's of which at least one should be picked.</summary> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] | ||
public sealed class AnyOfAttribute(params string[] schemas) : SubSchemasAttribute(schemas) { } |
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,5 @@ | ||
namespace Qowaiv.OpenApi.DataAnnotations; | ||
|
||
/// <summary>Specifies the involved sub schema's of which one should be picked.</summary> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] | ||
public sealed class OneOfAttribute(params string[] schemas) : SubSchemasAttribute(schemas) { } |
7 changes: 7 additions & 0 deletions
7
src/Qowaiv.OpenApi.DataAnnotations/Properties/GlobalUsings.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,7 @@ | ||
global using System; | ||
global using System.Collections; | ||
global using System.Collections.Generic; | ||
global using System.Diagnostics; | ||
global using System.Diagnostics.CodeAnalysis; | ||
global using System.Globalization; | ||
global using System.Linq; |
25 changes: 25 additions & 0 deletions
25
src/Qowaiv.OpenApi.DataAnnotations/Qowaiv.OpenApi.DataAnnotations.csproj
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,25 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<Import Project="../../props/package.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net8.0;net9.0</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<Version>0.0.1-alpha-028</Version> | ||
<PackageId>Qowaiv.OpenApi.DataAnnotations</PackageId> | ||
<PackageReleaseNotes> | ||
<![CDATA[ | ||
ToBeReleased | ||
- Initial alpha release | ||
]]> | ||
</PackageReleaseNotes> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="../../shared/Guard.cs" Link="Guard.cs" /> | ||
</ItemGroup> | ||
|
||
|
||
</Project> |
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 @@ | ||
# Open API data annotations |
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,10 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Qowaiv.OpenApi.DataAnnotations; | ||
|
||
/// <summary>Specifies the involved sub schema's.</summary> | ||
public abstract class SubSchemasAttribute(params string[] schemas) : Attribute | ||
{ | ||
/// <summary>The specified sub schema's.</summary> | ||
public IReadOnlyCollection<string> Schemas { get; } = schemas; | ||
} |