Skip to content

Commit ceefff8

Browse files
#142 - Improves OpenAPI code generation (#144)
Addresses issues in OpenAPI code generation, specifically regarding: # TLDR; Fixes OpenAPI code generation by correctly handling `anyOf` schemas, array types, various data types, and parameter handling, ensuring more accurate and robust client code generation. # Summary This PR enhances the OpenAPI code generator to correctly handle various OpenAPI schema constructs, including `anyOf` schemas, array types, and different data types (integers, doubles, booleans). It also improves parameter handling, including optional query parameters and header parameters. The changes ensure that the generated client code is more accurate and robust. # Details - Correctly maps `anyOf` schemas to nullable types in C#. - Properly handles arrays of integers and references. - Supports `int64` and `double` formats. - Handles boolean types. - Skips string enums. - Correctly handles optional query parameters and header parameters. - Sanitizes parameter names. - Handles operations without `operationId`. - Handles multiple response types. - Handles empty response content. - Handles required header parameters. - Handles string default values. - Handles operations with only error response. - Handles required query parameters. - Handles POST without request body. - Handles boolean default value. - Handles path with multiple operations. Fixes #142
1 parent 8f997cd commit ceefff8

File tree

10 files changed

+2109
-222
lines changed

10 files changed

+2109
-222
lines changed

RestClient.Net.OpenApiGenerator.Tests/MSTestSettings.cs

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)