-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Milestone
Description
If API return type is object then generated method returns InlineResponse200, but not object.
This InlineResponse200 also has an invalid Equals() implementation which produces the following compilation error:
error CS0126: An object of a type convertible to 'bool' is required
Swagger spec:
{
"swagger": "2.0",
"paths": {
"/api/test": {
"get": {
"operationId": "Test",
"responses": {
"200": {
"schema": { "type": "object" }
}
}
}
}
}
}Generated code:
public interface IDefaultApi
{
InlineResponse200 Test ();
}
public class InlineResponse200 : IEquatable<InlineResponse200>
{
public bool Equals(InlineResponse200 other)
{
if (other == null)
return false;
return ;
}
}Expected:
public interface IDefaultApi
{
object Test();
}