zenvia / zenvia-openapi-spec

Zenvia API OpenAPI Specification
MIT License
16 stars 6 forks source link

[c#]Found incompatible property types , for property 'message' in schema inheritance chain #71

Open luizfbicalho opened 3 years ago

luizfbicalho commented 3 years ago

I got this error to generate the c#
autorest --input-file=../openapiv2.json --csharp --output-folder=API --namespace=Zenvia.API --v3

and that's the result

AutoRest code generation utility [cli version: 3.0.6247; node: v12.18.3, max-memory: 2048 gb] (C) 2018 Microsoft Corporation. https://aka.ms/autorest Loading AutoRest core 'C:\Users\luizb.autorest\@autorest_core@3.0.6320\node_modules\@autorest\core\dist' (3.0.6320) Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.3.79->2.3.91) Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.55->2.3.55) FATAL: System.InvalidOperationException: Found incompatible property types , for property 'message' in schema inheritance chain at AutoRest.Modeler.SchemaResolver.ExpandAllOf(Schema schema) in /opt/vsts/work/1/s/src/SchemaResolver.cs:line 157 at AutoRest.Modeler.SchemaResolver.Unwrap(Schema schema) in /opt/vsts/work/1/s/src/SchemaResolver.cs:line 75 at AutoRest.Modeler.SchemaBuilder.BuildServiceType(String serviceTypeName, Boolean required) in /opt/vsts/work/1/s/src/SchemaBuilder.cs:line 35 at AutoRest.Modeler.SwaggerModeler.BuildCompositeTypes() in /opt/vsts/work/1/s/src/SwaggerModeler.cs:line 348 at AutoRest.Modeler.SwaggerModeler.Build(ServiceDefinition serviceDefinition) in /opt/vsts/work/1/s/src/SwaggerModeler.cs:line 66 at AutoRest.Modeler.Program.d2.MoveNext() in /opt/vsts/work/1/s/src/Program.cs:line 60 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NewPlugin.d15.MoveNext() Error: Plugin imodeler1 reported failure.

with the swagger editor I got compilation error

rafael-org commented 3 years ago

Thank you for the report. We will take a look on this.