diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/FormatResponses.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/FormatResponses.kt index ffb411d1..908db1cc 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/FormatResponses.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/FormatResponses.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import org.threeten.bp.LocalDate import org.threeten.bp.ZonedDateTime @@ -16,6 +17,7 @@ import org.threeten.bp.ZonedDateTime * @property datetimeProperty * @property enumProperty */ +@JsonClass(generateAdapter = true) data class FormatResponses( @Json(name = "date_property") @field:Json(name = "date_property") var dateProperty: LocalDate? = null, @Json(name = "datetime_property") @field:Json(name = "datetime_property") var datetimeProperty: ZonedDateTime? = null, @@ -25,6 +27,7 @@ data class FormatResponses( * * Values: VALUE1, VALUE2 */ + @JsonClass(generateAdapter = false) enum class EnumPropertyEnum(val value: String) { @Json(name = "VALUE1") VALUE1("VALUE1"), @Json(name = "VALUE2") VALUE2("VALUE2") diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/PropertyArray.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/PropertyArray.kt index 9ff43540..2cee1299 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/PropertyArray.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/PropertyArray.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import java.math.BigDecimal /** @@ -14,6 +15,7 @@ import java.math.BigDecimal * @property numberArray * @property stringArray */ +@JsonClass(generateAdapter = true) data class PropertyArray( @Json(name = "number_array") @field:Json(name = "number_array") var numberArray: List? = null, @Json(name = "string_array") @field:Json(name = "string_array") var stringArray: List? = null diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/PropertyMap.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/PropertyMap.kt index d9352b49..3fffe32f 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/PropertyMap.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/PropertyMap.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import java.math.BigDecimal /** @@ -15,6 +16,7 @@ import java.math.BigDecimal * @property objectMap * @property stringMap */ +@JsonClass(generateAdapter = true) data class PropertyMap( @Json(name = "number_map") @field:Json(name = "number_map") var numberMap: Map? = null, @Json(name = "object_map") @field:Json(name = "object_map") var objectMap: Map? = null, diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/RequiredTypeResponses.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/RequiredTypeResponses.kt index da49f88d..afdfa951 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/RequiredTypeResponses.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/RequiredTypeResponses.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import java.math.BigDecimal /** @@ -17,6 +18,7 @@ import java.math.BigDecimal * @property numberProperty * @property stringProperty */ +@JsonClass(generateAdapter = true) data class RequiredTypeResponses( @Json(name = "boolean_property") @field:Json(name = "boolean_property") var booleanProperty: Boolean, @Json(name = "enum_property") @field:Json(name = "enum_property") var enumProperty: RequiredTypeResponses.EnumPropertyEnum, @@ -28,6 +30,7 @@ data class RequiredTypeResponses( * * Values: VALUE1, VALUE2 */ + @JsonClass(generateAdapter = false) enum class EnumPropertyEnum(val value: String) { @Json(name = "VALUE1") VALUE1("VALUE1"), @Json(name = "VALUE2") VALUE2("VALUE2") diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/ReservedKeywords.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/ReservedKeywords.kt index 4251ddef..2b5e00de 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/ReservedKeywords.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/ReservedKeywords.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass /** * @@ -17,6 +18,7 @@ import com.squareup.moshi.Json * @property `var` * @property `when` */ +@JsonClass(generateAdapter = true) data class ReservedKeywords( @Json(name = "class") @field:Json(name = "class") var `class`: String? = null, @Json(name = "for") @field:Json(name = "for") var `for`: String? = null, diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/TopLevelEnum.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/TopLevelEnum.kt index 4d9819e5..a5ca6d1d 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/TopLevelEnum.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/TopLevelEnum.kt @@ -7,11 +7,13 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass /** * * Values: VALUE1,VALUE2 */ +@JsonClass(generateAdapter = false) enum class TopLevelEnum(val value: String) { @Json(name = "TOP_LEVEL_VALUE1") VALUE1("TOP_LEVEL_VALUE1"), @Json(name = "TOP_LEVEL_VALUE2") VALUE2("TOP_LEVEL_VALUE2") diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/TypeResponses.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/TypeResponses.kt index bd11fa0c..20547696 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/TypeResponses.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/TypeResponses.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import java.math.BigDecimal /** @@ -16,6 +17,7 @@ import java.math.BigDecimal * @property numberProperty * @property stringProperty */ +@JsonClass(generateAdapter = true) data class TypeResponses( @Json(name = "boolean_property") @field:Json(name = "boolean_property") var booleanProperty: Boolean? = null, @Json(name = "integer_property") @field:Json(name = "integer_property") var integerProperty: Int? = null, diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableFormatResponses.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableFormatResponses.kt index 5d6b003a..b09d5bbe 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableFormatResponses.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableFormatResponses.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import com.yelp.codegen.generatecodesamples.tools.XNullable import org.threeten.bp.LocalDate import org.threeten.bp.ZonedDateTime @@ -17,6 +18,7 @@ import org.threeten.bp.ZonedDateTime * @property datetimeProperty * @property doubleProperty */ +@JsonClass(generateAdapter = true) data class XnullableFormatResponses( @Json(name = "date_property") @field:Json(name = "date_property") @XNullable var dateProperty: LocalDate? = null, @Json(name = "datetime_property") @field:Json(name = "datetime_property") @XNullable var datetimeProperty: ZonedDateTime? = null, diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullablePropertyArray.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullablePropertyArray.kt index 0858110b..b9ca8f8b 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullablePropertyArray.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullablePropertyArray.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import com.yelp.codegen.generatecodesamples.tools.XNullable import java.math.BigDecimal @@ -15,6 +16,7 @@ import java.math.BigDecimal * @property numberArray * @property stringArray */ +@JsonClass(generateAdapter = true) data class XnullablePropertyArray( @Json(name = "number_array") @field:Json(name = "number_array") @XNullable var numberArray: List? = null, @Json(name = "string_array") @field:Json(name = "string_array") @XNullable var stringArray: List? = null diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullablePropertyMap.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullablePropertyMap.kt index 729245ff..bae00b6f 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullablePropertyMap.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullablePropertyMap.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import com.yelp.codegen.generatecodesamples.tools.XNullable import java.math.BigDecimal @@ -16,6 +17,7 @@ import java.math.BigDecimal * @property objectMap * @property stringMap */ +@JsonClass(generateAdapter = true) data class XnullablePropertyMap( @Json(name = "number_map") @field:Json(name = "number_map") @XNullable var numberMap: Map? = null, @Json(name = "object_map") @field:Json(name = "object_map") @XNullable var objectMap: Map? = null, diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredPropertyArray.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredPropertyArray.kt index 5928498a..73bbbce9 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredPropertyArray.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredPropertyArray.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import com.yelp.codegen.generatecodesamples.tools.XNullable import java.math.BigDecimal @@ -15,6 +16,7 @@ import java.math.BigDecimal * @property numberArray * @property stringArray */ +@JsonClass(generateAdapter = true) data class XnullableRequiredPropertyArray( @Json(name = "number_array") @field:Json(name = "number_array") @XNullable var numberArray: List? = null, @Json(name = "string_array") @field:Json(name = "string_array") @XNullable var stringArray: List? = null diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredPropertyMap.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredPropertyMap.kt index a128e93d..f0e3ccc3 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredPropertyMap.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredPropertyMap.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import com.yelp.codegen.generatecodesamples.tools.XNullable import java.math.BigDecimal @@ -16,6 +17,7 @@ import java.math.BigDecimal * @property objectMap * @property stringMap */ +@JsonClass(generateAdapter = true) data class XnullableRequiredPropertyMap( @Json(name = "number_map") @field:Json(name = "number_map") @XNullable var numberMap: Map? = null, @Json(name = "object_map") @field:Json(name = "object_map") @XNullable var objectMap: Map? = null, diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredTypeResponses.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredTypeResponses.kt index b5a62c72..5386889d 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredTypeResponses.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableRequiredTypeResponses.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import com.yelp.codegen.generatecodesamples.tools.XNullable import java.math.BigDecimal @@ -18,6 +19,7 @@ import java.math.BigDecimal * @property numberProperty * @property stringProperty */ +@JsonClass(generateAdapter = true) data class XnullableRequiredTypeResponses( @Json(name = "boolean_property") @field:Json(name = "boolean_property") @XNullable var booleanProperty: Boolean? = null, @Json(name = "enum_property") @field:Json(name = "enum_property") @XNullable var enumProperty: XnullableRequiredTypeResponses.EnumPropertyEnum? = null, @@ -29,6 +31,7 @@ data class XnullableRequiredTypeResponses( * * Values: VALUE1, VALUE2 */ + @JsonClass(generateAdapter = false) enum class EnumPropertyEnum(val value: String) { @Json(name = "VALUE1") VALUE1("VALUE1"), @Json(name = "VALUE2") VALUE2("VALUE2") diff --git a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableTypeResponses.kt b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableTypeResponses.kt index dea572f2..27e60269 100644 --- a/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableTypeResponses.kt +++ b/samples/junit-tests/src/main/java/com/yelp/codegen/generatecodesamples/models/XnullableTypeResponses.kt @@ -7,6 +7,7 @@ package com.yelp.codegen.generatecodesamples.models import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass import com.yelp.codegen.generatecodesamples.tools.XNullable import java.math.BigDecimal @@ -18,6 +19,7 @@ import java.math.BigDecimal * @property numberProperty * @property stringProperty */ +@JsonClass(generateAdapter = true) data class XnullableTypeResponses( @Json(name = "boolean_property") @field:Json(name = "boolean_property") @XNullable var booleanProperty: Boolean? = null, @Json(name = "enum_property") @field:Json(name = "enum_property") @XNullable var enumProperty: XnullableTypeResponses.EnumPropertyEnum? = null, @@ -29,6 +31,7 @@ data class XnullableTypeResponses( * * Values: VALUE1, VALUE2 */ + @JsonClass(generateAdapter = false) enum class EnumPropertyEnum(val value: String) { @Json(name = "VALUE1") VALUE1("VALUE1"), @Json(name = "VALUE2") VALUE2("VALUE2")