e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 21): Parameter name expected
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 22): Expecting comma or ')'
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 22): Expecting ')'
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 23): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 27): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 33): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 34): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 35): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 39): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 41): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 47): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 48): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 54): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 56): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 58): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 64): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 65): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 70): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 71): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 74): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 76): Expecting member declaration
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (28, 76): Function declaration must have a name
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (34, 22): Unresolved reference: petId
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (34, 44): Unresolved reference: petId
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (34, 65): Unresolved reference: petId
e: generator-test/src/main/kotlin/org/openapitools/client/apis/PetsApi.kt: (44, 37): Type mismatch: inferred type is Array<Pet> but Unit was expected
Bug Report Checklist
Description
Kotlin generator generates invalid code when parameter name contain $
openapi-generator version
4.0.0-beta2
OpenAPI declaration file content or url
Command line used for generation
Using the open api above as the content of petstore.yaml
openapi-generator generate -i ./petstore.yaml -g kotlin
Steps to reproduce
Fails with
Related issues/PRs
No related issue
Suggest a fix
$ should be escaped when used in kotlin strings names