Skip to content
New issue

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

Kotlin client warnings #2462

Closed
6 tasks
wing328 opened this issue Mar 20, 2019 · 0 comments · Fixed by #2470
Closed
6 tasks

Kotlin client warnings #2462

wing328 opened this issue Mar 20, 2019 · 0 comments · Fixed by #2470

Comments

@wing328
Copy link
Member

wing328 commented Mar 20, 2019

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

When running gradle test with the Kotline petstore client, I got the following warning:

> Task :compileKotlin
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt: (48, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt: (80, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt: (112, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt: (144, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt: (176, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt: (207, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt: (240, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt: (274, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt: (47, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt: (78, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt: (110, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt: (142, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt: (47, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt: (78, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt: (109, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt: (140, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt: (172, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt: (205, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt: (235, 13): 'when' is exhaustive so 'else' is redundant here
w: /Users/williamcheng/Code/openapi-generator/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt: (267, 13): 'when' is exhaustive so 'else' is redundant here
openapi-generator version

Latest master

Command line used for generation

cd samples/client/petstore/kotlin && gradle test

Steps to reproduce
Related issues/PRs
Suggest a fix

If anyone has time to contribute a PR to address these warnings, please let us know.

Kotlin client mustache templates: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/kotlin-client/api.mustache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant