Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import io.swagger.v3.oas.annotations.media.Schema
import java.math.BigDecimal

@JsonIgnoreProperties(ignoreUnknown = true)

/**
* ClientSDKAPIResponse
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.core.JsonParseException
import com.fasterxml.jackson.core.JsonParser
Expand Down Expand Up @@ -36,7 +35,6 @@ class VariableDeserializer : JsonDeserializer<BaseConfigVariable>() {
}

@JsonDeserialize(using = VariableDeserializer::class)
@JsonIgnoreProperties(ignoreUnknown = true)
abstract class BaseConfigVariable {
abstract val id: String
abstract val value: Any
Expand All @@ -46,7 +44,6 @@ abstract class BaseConfigVariable {
}

@JsonDeserialize(`as` = StringConfigVariable::class)
@JsonIgnoreProperties(ignoreUnknown = true)
class StringConfigVariable(
@JsonProperty("_id")
override val id: String,
Expand All @@ -57,7 +54,6 @@ class StringConfigVariable(
) : BaseConfigVariable()

@JsonDeserialize(`as` = BooleanConfigVariable::class)
@JsonIgnoreProperties(ignoreUnknown = true)
class BooleanConfigVariable(
@JsonProperty("_id")
override val id: String,
Expand All @@ -68,7 +64,6 @@ class BooleanConfigVariable(
) : BaseConfigVariable()

@JsonDeserialize(`as` = NumberConfigVariable::class)
@JsonIgnoreProperties(ignoreUnknown = true)
class NumberConfigVariable(
@JsonProperty("_id")
override val id: String,
Expand All @@ -79,7 +74,6 @@ class NumberConfigVariable(
) : BaseConfigVariable()

@JsonDeserialize(`as` = JSONObjectConfigVariable::class)
@JsonIgnoreProperties(ignoreUnknown = true)
class JSONObjectConfigVariable(
@JsonProperty("_id")
override val id: String,
Expand All @@ -90,7 +84,6 @@ class JSONObjectConfigVariable(
) : BaseConfigVariable()

@JsonDeserialize(`as` = JSONArrayConfigVariable::class)
@JsonIgnoreProperties(ignoreUnknown = true)
class JSONArrayConfigVariable(
@JsonProperty("_id")
override val id: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty

class DevCycleUser private constructor(
data class DevCycleUser private constructor(
private var _userId: String?,
private var _isAnonymous: Boolean?,
var email: String? = null,
Expand All @@ -28,8 +27,6 @@ class DevCycleUser private constructor(
}

class Builder internal constructor() {
@JsonIgnoreProperties(ignoreUnknown = true)

private var userId: String? = null
private var isAnonymous: Boolean? = null
private var email: String? = null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import io.swagger.v3.oas.annotations.media.Schema

@JsonIgnoreProperties(ignoreUnknown = true)

class EdgeDB {
data class EdgeDB {
/**
* Enabled flag, that is set by the Bucketed User Config -> Project Settings -> EdgeDB
* @return _id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import io.swagger.v3.oas.annotations.media.Schema

@JsonIgnoreProperties(ignoreUnknown = true)

/**
* Environment
*/
class Environment {
data class Environment {
/**
* unique database id
* @return _id
Expand All @@ -27,6 +24,7 @@ class Environment {
description = "Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id."
)
var key: String? = null

fun id(id: String?): Environment {
this.id = id
return this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ package com.devcycle.sdk.android.model

import io.swagger.v3.oas.annotations.media.Schema
import com.fasterxml.jackson.annotation.JsonFormat
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import java.util.*

@JsonIgnoreProperties(ignoreUnknown = true)
data class ErrorResponse (
@Schema(required = true, description = "Error message")
@JsonFormat(with = [JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonValue
import io.swagger.v3.oas.annotations.media.Schema

@JsonIgnoreProperties(ignoreUnknown = true)

/**
* Feature
*/
class Feature {
data class Feature {
Copy link
Member Author

Choose a reason for hiding this comment

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

this is interesting that this was missing...

Copy link
Member Author

Choose a reason for hiding this comment

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

image

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess do we want these to be data classes?

Copy link
Contributor

@kaushalkapasi kaushalkapasi Jun 19, 2025

Choose a reason for hiding this comment

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

yeah, I just made the same update in my PR #240. though it does need some refactoring to make sure everything compiles, the test data is updated and all test pass appropriately

/**
* unique database id
* @return _id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import io.swagger.v3.oas.annotations.media.Schema

@JsonIgnoreProperties(ignoreUnknown = true)

/**
* Project
*/
class Project {
data class Project {
/**
* unique database id
* @return _id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import io.swagger.v3.oas.annotations.media.Schema

@JsonIgnoreProperties(ignoreUnknown = true)

class ProjectSettings {
data class ProjectSettings {
/**
* edgeDB Project Settings
* @return edgeDB
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.devcycle.sdk.android.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import io.swagger.v3.oas.annotations.media.Schema

@JsonIgnoreProperties(ignoreUnknown = true)

class SSE {
data class SSE {
/**
* SSE connection URL, that is set by the Bucketed User Config -> SSE -> URL
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import com.devcycle.sdk.android.listener.BucketedUserConfigListener
import com.devcycle.sdk.android.exception.DVCVariableException
import com.devcycle.sdk.android.util.JSONMapper
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonValue
import kotlinx.coroutines.*
Expand All @@ -29,8 +28,6 @@ import java.beans.PropertyChangeEvent
import java.beans.PropertyChangeListener
import java.lang.IllegalArgumentException

@JsonIgnoreProperties(ignoreUnknown = true)

/**
* Variable
*/
Expand All @@ -42,7 +39,7 @@ class Variable<T> internal constructor(
@JsonProperty("_id")
var id: String? = null,
/**
* Unique key by Project, can be used in the SDK / API to reference by &#x27;key&#x27; rather than _id.
* Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id.
* @return key
*/
val key: String,
Expand Down
Loading