Skip to content

Conversation

@MelbourneDeveloper
Copy link
Owner

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

@MelbourneDeveloper MelbourneDeveloper merged commit ceefff8 into main Oct 22, 2025
1 check passed
@MelbourneDeveloper MelbourneDeveloper deleted the #142-codegen branch October 22, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated models resolve to object and do not include children. Some are incorrect.

2 participants