Releases: Nikcio-labs/openapi-code-generator
Releases · Nikcio-labs/openapi-code-generator
Version 1.0.0
OpenAPI Code Generator v1.0.0
The first stable release of OpenAPI Code Generator — a fast, opinionated C# code generator for OpenAPI 3.x specifications.
What is it?
OpenAPI Code Generator transforms OpenAPI 3.x specs (JSON or YAML) into clean, modern C# code, generating record types, enums, and type aliases with full nullable reference type support and System.Text.Json serialization out of the box — with zero runtime dependencies on the generated code.
Highlights
- Modern C# output — Generates
recordtypes with init-only properties - String enums —
[JsonStringEnumConverter]-backed enums with[JsonStringEnumMemberName]attributes - Nullable reference types — Full
#nullable enablesupport throughout generated output - Immutable collections —
IReadOnlyList<T>andIReadOnlyDictionary<string, T>by default - Composition support — Handles
allOf,oneOf, andanyOfschemas - URL input — Fetch and generate directly from remote OpenAPI specs
- XML doc comments — Generated from OpenAPI
descriptionfields - Configurable — Namespace, mutability, nullability, default values, and more
Installation
dotnet tool install --global Nikcio.OpenApiCodeGenQuick Start
# From a local file
openapi-codegen petstore.yaml -o Models.cs
# From a remote URL with a custom namespace
openapi-codegen https://petstore3.swagger.io/api/v3/openapi.json -o PetStore.cs -n MyApp.ModelsDocumentation
Full documentation is available at nikcio-labs.github.io/openapi-code-generator
Version 1.0.0-preview001
Initial preview