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

chore: [ANDROSDK-1983] Move DataValue to network layer #2282

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

taridepaco
Copy link
Collaborator

Related task: ANDROSDK-1983

@taridepaco taridepaco self-assigned this Jan 17, 2025
val attributeOptionCombo: String,
val value: String?,
val storedBy: String?,
val created: String,
Copy link
Member

Choose a reason for hiding this comment

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

created and lastUpdated are not nullable, is it right?

@Serializable
internal data class DataValueImportSummaryDTO(
val importCount: ImportCountDTO,
@SerialName("status") val importStatus: String,
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we just adapt the property name to avoid the definition of a different @SerialName ?

import org.hisp.dhis.android.network.common.dto.WebResponseDTO

@Serializable
internal data class DataValueImportSummaryWebResponseDTO(
Copy link
Member

Choose a reason for hiding this comment

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

This is an example of a class that was originally created for the API and whose properties map 1to1 to the domain class. I think it is required if we want to keep them separated, but I feel it like a kind of duplication

@@ -78,6 +79,10 @@ class D2 internal constructor(internal val d2DIComponent: D2DIComponent) {
return d2DIComponent.httpServiceClient
}

fun httpServiceClientKotlinx(): HttpServiceClientKotlinx {
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't it be internal at least? It should avoid all the modifications in HttpServiceClientKotlinx done in this PR

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 this pull request may close these issues.

2 participants