BillingData: Move schema to Resources/

This commit is contained in:
2024-01-05 13:45:37 +01:00
parent 121ca10261
commit e75e2ddbda
3 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\Images\Elwig.png" /> <Resource Include="Resources\Images\Elwig.png" />
<Content Include="Resources\Images\Elwig.ico" /> <Content Include="Resources\Images\Elwig.ico" />
<EmbeddedResource Include="Schemas\payment_variant.json" /> <EmbeddedResource Include="Resources\Schemas\PaymentVariantData.json" />
<EmbeddedResource Include="Resources\Sql\*" /> <EmbeddedResource Include="Resources\Sql\*" />
</ItemGroup> </ItemGroup>

View File

@ -11,7 +11,7 @@ namespace Elwig.Helpers.Billing {
public static JsonSchema? Schema { get; private set; } public static JsonSchema? Schema { get; private set; }
public static async Task Init() { public static async Task Init() {
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Elwig.Schemas.payment_variant.json"); var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Elwig.Resources.Schemas.PaymentVariantData.json");
Schema = await JsonSchema.FromJsonAsync(stream ?? throw new ArgumentException("JSON schema not found")); Schema = await JsonSchema.FromJsonAsync(stream ?? throw new ArgumentException("JSON schema not found"));
} }