File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,28 @@ When the web service is started it should display the port the service is runnin
2828
2929![ Express.NET Hello World] ( https://raw.githubusercontent.com/Vake93/Express.NET/main/doc/images/xps-helloworld.gif )
3030
31+ # Swagger at not extra code
32+ Express.NET generates OpenAPI documents and has built-in swagger support. No extra code required!
33+
34+ ```
35+ service PersonService;
36+
37+ csharp
38+ {
39+ public record Person (string Name, int Age);
40+ public record Error (string Description);
41+ }
42+
43+ get Ok<Person> | NotFound<Error> (query string name)
44+ {
45+ if (name == "Vishvaka")
46+ return Ok(new Person("Vishvaka", 28));
47+ else
48+ return NotFound(new Error($"Person with {name} not found."));
49+ }
50+ ```
51+ ![ Express.NET Swagger Support] ( https://raw.githubusercontent.com/Vake93/Express.NET/main/doc/images/xps-swagger.gif )
52+
3153## Still this is work in progress. Things Todo
3254
3355- [ ] Better diagnostic messages.
You can’t perform that action at this time.
0 commit comments