fullstackhero / blazor-wasm-boilerplate

Clean Architecture Boilerplate Template for .NET 6.0 Blazor WebAssembly built for FSH WebAPI with the goodness of MudBlazor Components.
https://fullstackhero.net/blazor-webassembly-boilerplate/general/getting-started/
MIT License
527 stars 324 forks source link

How to update FSHAPI.cs? #275

Closed Sevi09 closed 1 year ago

Sevi09 commented 1 year ago

I am trying to use fullstackhero (API, WebAssembly) in my personal project. So far, I have successfully added a new Catalog Class, Feature Classes, Migrations, Data Seeds, Controller, and Permissions. Now I am able to view the pre-populated data through the controller - excellent. But how do I extend the WASM boilerplate? I think creating a new FSHApi.cs using nswag is the first step. I've read documentation and watched videos, but I am unable to produce a file similar to the original.

Sevi09 commented 1 year ago

Oh, I have independently resolved the issue, However, as it has taken up a significant amount of my time, I find it necessary to document it.

PS C:\Users\frauenhs\Documents\Projekte\FSH.WASM.Starter\src\Client.Infrastructure\ApiClient> nswag run nswag.json
NSwag command line tool for .NET 4.6.1+ WinX64, toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))
Visit http://NSwag.org for more information.
NSwag bin directory: C:\Program Files (x86)\Rico Suter\NSwagStudio\Win

Executing file 'nswag.json' with variables ''...
Done.

Duration: 00:00:13.1099698
Sevi09 commented 1 year ago

Oh, there is also an official powershell script for updating: \scripts> .\nswag-regen.ps1