Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator
https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator
- Owner: s-tarasov
- Created: 2022-10-15T17:55:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-22T12:10:35.000Z (almost 2 years ago)
- Last Synced: 2024-06-29T11:50:15.680Z (4 months ago)
- Language: C#
- Size: 20.5 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- RSCG_Examples - ST.NSwag.ServerSourceGenerator - tarasov/ST.NSwag.ServerSourceGenerator (Contributors Welcome for those / 1. [ThisAssembly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisAssembly) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category)
- csharp-source-generators - ST.NSwag.ServerSourceGenerator - ![stars](https://img.shields.io/github/stars/s-tarasov/ST.NSwag.ServerSourceGenerator?style=flat-square&cacheSeconds=604800) ![last commit](https://img.shields.io/github/last-commit/s-tarasov/ST.NSwag.ServerSourceGenerator?style=flat-square&cacheSeconds=86400) Generates Web API/ASP.NET Core controllers from a OpenAPI specification. (Source Generators / Webprogramming)
README
# [ST.NSwag.ServerSourceGenerator](https://github.com/s-tarasov/ST.NSwag.ServerSourceGenerator)
Generates Web API/ASP.NET Core controllers from a OpenAPI specification.
This package is source generator for great [nswag tool](https://github.com/RicoSuter/NSwag).
Inspired by [H.NSwag.Generator](https://github.com/HavenDV/H.NSwag.Generator)### Install
```
Install-Package ST.NSwag.ServerSourceGenerator
```### Usage
1. Put openapi specification in project dir and add AdditionalFiles tag to project```xml
```
or link specification outside project dir```xml
```
2. Add .nswag settings file in project dir with exact same name.
Example: example.openapi.yaml -> example.openapi.yaml.nswag### Faq
- How to generate or edit .nswag file?
> Use [NSwagStudio](https://github.com/RicoSuter/NSwag/wiki/NSwagStudio)