jonahwh / tesla-api-client

Tesla API docs and Java client
18 stars 10 forks source link

NSwag Studio Error: Unexpected initial token 'String' when populating object #7

Closed leepfrog-ger closed 4 years ago

leepfrog-ger commented 4 years ago

Thanks for your work on this. I just tried to use the most recent version with NSwag Studio and it errors out:

Newtonsoft.Json.JsonSerializationException: Unexpected initial token 'String' when populating object. Expected JSON object or array. Path 'definitions.VehicleState.properties.software_update.properties.version', line 1, position 45567.

Error seems to be here: https://github.com/jonahwh/tesla-api-client/blob/6c54796a94e3d5819353c78f1eefaa04b2c03b1d/swagger.yml#L1928

When I change this to the following it works:

          version: 
            type: string

Not submitting this as a PR as my knowledge of swagger is too limited to determine if this is an appropriate fix