Skip to content

[Kotlin] Add kotlin.collections.Set support for unique item arrays#4247

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
mtraynham:kotlin_set_support
Oct 28, 2019
Merged

[Kotlin] Add kotlin.collections.Set support for unique item arrays#4247
wing328 merged 1 commit intoOpenAPITools:masterfrom
mtraynham:kotlin_set_support

Conversation

@mtraynham
Copy link
Contributor

@mtraynham mtraynham commented Oct 24, 2019

Adds support for kotlin.collections.Set array types, when interpreting ArraySchema.getUniqueItems()

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@jimschubert @dr4ke616 @karismann @Zomzog

@wing328
Copy link
Member

wing328 commented Oct 28, 2019

@mtraynham thanks for the PR, which looks good to me.

@mtraynham
Copy link
Contributor Author

Thanks @wing328 !

@mtraynham mtraynham deleted the kotlin_set_support branch October 28, 2019 19:42
Copy link
Member

@jimschubert jimschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this cause compilation error because instantiation currently only knows of maps and lists?

@jimschubert
Copy link
Member

Oh. I see that the change affects the generic type construction, and we're not changing actual type mapping for the array type (which would need a setOf instantiation type).

@wing328
Copy link
Member

wing328 commented Oct 31, 2019

@mtraynham thanks for the PR, which has been included in v4.2.0 release: https://twitter.com/oas_generator/status/1189824932345069569

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants