Bug Report Checklist
Description
CSharp code generator creates code that does not compile for webhooks using OpenAPI 3.1's webhooks root object.
The yaml posted below generates the following code:
/// <summary>
/// The <see cref="IHelloWorldPostApiResponse"/>
/// </summary>
public interface IHelloWorldPostApiResponse : Org.OpenAPITools.Client.IApiResponse
{
/// <summary>
/// Returns true if the response is 204
/// </summary>
/// <returns></returns>
bool Is { get; }
/// <summary>
/// Returns true if the response is 500
/// </summary>
/// <returns></returns>
bool Is { get; }
}
openapi-generator version
7.12.0
OpenAPI declaration file content or url
openapi: 3.1.0
info:
title: Minimal reproduction for csharp webhook bug
version: 1.0.0
description: This is an example API to reproduce a bug with webhooks in csharp codegen
tags:
- name: Test
description: This is a test
webhooks:
helloWorld:
post:
summary: Example webhook
responses:
"204":
description: Webhook processed
"500":
description: Webhook not processed
description: Send when an example is needed
requestBody:
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: The payload of the HelloWorld webhook
description: Contains the details of the hello world webhook
Generation Details
Running the CLI command using the wrapper from https://github.com/OpenAPITools/openapi-generator-cli. No extra config.
Steps to reproduce
Running openapi-generator-cli generate -g csharp -i "./WebhooksTest.yaml" -o "./WebhooksTest" against the yaml above.
Bug Report Checklist
Description
CSharp code generator creates code that does not compile for webhooks using OpenAPI 3.1's webhooks root object.
The yaml posted below generates the following code:
openapi-generator version
7.12.0
OpenAPI declaration file content or url
Generation Details
Running the CLI command using the wrapper from https://github.com/OpenAPITools/openapi-generator-cli. No extra config.
Steps to reproduce
Running
openapi-generator-cli generate -g csharp -i "./WebhooksTest.yaml" -o "./WebhooksTest"against the yaml above.