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

Nullability change in moshi JsonAdapter #74

Closed
carlosefonseca opened this issue Dec 13, 2019 · 1 comment · Fixed by #78
Closed

Nullability change in moshi JsonAdapter #74

carlosefonseca opened this issue Dec 13, 2019 · 1 comment · Fixed by #78

Comments

@carlosefonseca
Copy link

I'm getting errors on the generated classes for

  • LocalDateAdapter
  • ZonedDateTimeAdapter
  • BigDecimalJsonAdapter

The method

override fun toJson(writer: JsonWriter?, value: ZonedDateTime?) {

seems to have changed to

override fun toJson(writer: JsonWriter, value: ZonedDateTime?) {

but I'm using the same moshi versions as the samples (1.8.0)

Screen Shot 2019-12-13 at 20 09 35

cortinico added a commit to cortinico/swagger-gradle-codegen that referenced this issue Dec 26, 2019
Updating generated methods `toJson` to accept a non null `JsonWriter`.
Previously the IDE was raising an issue due to different method signature.

Fixes Yelp#74
@cortinico
Copy link
Collaborator

Thanks for reporting this @carlosefonseca, and sorry for the late reply.
You're right. We can update the mustache template that generates those JsonAdapters.

The fix for this will be in this PR: #78

cortinico added a commit to cortinico/swagger-gradle-codegen that referenced this issue Jan 1, 2020
Updating generated methods `toJson` to accept a non null `JsonWriter`.
Previously the IDE was raising an issue due to different method signature.

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

Successfully merging a pull request may close this issue.

2 participants