Skip to content

Commit 8ccbcb4

Browse files
committed
doc(openapi): include supported openapi version in README
1 parent abf819f commit 8ccbcb4

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ Generates scaffolding for Web APIs from OpenAPI specifications.
44

55
The generated functionality will route, serialize/deserialize and validate payloads according to the specification.
66

7+
Supported OpenAPI version:
8+
- [2.0](https://spec.openapis.org/oas/v2.0.html)
9+
- [3.0.0](https://spec.openapis.org/oas/v3.0.0.html)
10+
- [3.0.1](https://spec.openapis.org/oas/v3.0.1.html)
11+
- [3.0.2](https://spec.openapis.org/oas/v3.0.2.html)
12+
- [3.0.3](https://spec.openapis.org/oas/v3.0.3.html)
13+
- [3.0.4](https://spec.openapis.org/oas/v3.0.4.html)
14+
- [3.1.0](https://spec.openapis.org/oas/v3.1.0.html)
15+
- [3.1.1](https://spec.openapis.org/oas/v3.1.1.html)
16+
- [3.1.2](https://spec.openapis.org/oas/v3.1.2.html)
17+
718
API frameworks supported:
819
- [Minimal API](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis)
920

@@ -52,9 +63,14 @@ app.MapOperations();
5263
app.Run();
5364
```
5465

55-
See [Example.OpenApi20](tests/Example.OpenApi20) as an example.
66+
Examples:
67+
- [OpenAPI 2.0](tests/Example.OpenApi20)
68+
- [OpenAPI 3.0](tests/Example.OpenApi30)
69+
- [OpenAPI 3.1](tests/Example.OpenApi31)
70+
71+
All specifications mostly generate similar abstractions. What might differ is the location of generated resources, which follows the respective structure of the OpenAPI specification, and the JSON types, which are based on the respective schema version.
5672

57-
**Note**: The Example.OpenApi20 references the generator through a project reference. Use a package reference instead as described above.
73+
**Note**: The Examples reference the generator through a project reference. Use a package reference instead as described above.
5874

5975
## Implementing an [API Operation](https://swagger.io/specification/#operation-object)
6076
The generator generates stubbed partial classes for any operation handlers (`Foo.Bar.Operation.Handler.cs`) if there are none existing in the project and logs it with a compiler warning (AF1001). The classes should be copied into source control and the operation methods implemented. The operation methods have a familiar request/response design:

0 commit comments

Comments
 (0)