We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the csharp generator with an array of objects produce code that cannot be compiled.
I have provided a minimal file to reproduce the problem and an example of the generated code that doesn't compile.
I have also provided the manual fix I need to do everytime I generate code
basically, it's just a minor fix to change: List<Dictionary> to List<Dictionary<string, object>>
List<Dictionary>
List<Dictionary<string, object>>
openapi: 3.0.3 info: title: Test version: 1.0.0.0 servers: - url: 'https://www.example.com' paths: /test: get: responses: '200': content: application/json: schema: $ref: '#/components/schemas/notificationtest-getElements-v1-Response-mPayload' description: Successful response operationId: Test summary: Retrieve an existing Notificationtest's Elements components: schemas: Custom-Variableobject-Response: description: A Variable object without predefined property names type: object additionalProperties: true Field-pkiNotificationtestID: type: integer notificationtest-getElements-v1-Response-mPayload: required: - pkiNotificationtestID - a_objVariableobject type: object properties: pkiNotificationtestID: $ref: '#/components/schemas/Field-pkiNotificationtestID' a_objVariableobject: type: array items: $ref: '#/components/schemas/Custom-Variableobject-Response'
The generated code is like this:
public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List<Dictionary> aObjVariableobject = default(List<Dictionary>))
It should be like this:
public NotificationtestGetElementsV1ResponseMPayload(int pkiNotificationtestID = default(int), List<Dictionary<string, object>> aObjVariableobject = default(List<Dictionary<string, object>>))
Thanks in advance
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug Report Checklist
Description
Using the csharp generator with an array of objects produce code that cannot be compiled.
I have provided a minimal file to reproduce the problem and an example of the generated code that doesn't compile.
I have also provided the manual fix I need to do everytime I generate code
basically, it's just a minor fix to change:
List<Dictionary>
to
List<Dictionary<string, object>>
OpenAPI declaration file content or url
Steps to reproduce
Suggest a fix
The generated code is like this:
It should be like this:
Thanks in advance
The text was updated successfully, but these errors were encountered: