Skip to content
Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
eaea6e3
feat: Add default values to open api generated classes
rahul-lohra Apr 9, 2025
99fb6cd
feat: Update package name on open api config
rahul-lohra Apr 9, 2025
5837094
feat: Ignore open api generated code from spotless
rahul-lohra Apr 9, 2025
018ca40
feat: Ignore open api generated code from spotless
rahul-lohra Apr 9, 2025
23d38d6
feat: Update api dump
rahul-lohra Apr 9, 2025
4b0d19f
Merge remote-tracking branch 'refs/remotes/origin/develop' into featu…
rahul-lohra Apr 9, 2025
eb54cbf
feat: revert ordering of properties in open api generated code
rahul-lohra Apr 9, 2025
6c64069
feat: update api dump
rahul-lohra Apr 9, 2025
4f3f4e6
feat: ignore auto gen code from sonar qube coverage
rahul-lohra Apr 10, 2025
44d4d9a
feat: ignore auto gen code from sonar qube coverage
rahul-lohra Apr 10, 2025
49f13a0
feat: ignore auto gen code from sonar qube coverage
rahul-lohra Apr 10, 2025
05bbcae
feat: ignore auto gen code from sonar qube coverage from duplications
rahul-lohra Apr 10, 2025
11c4cc3
feat: ignore auto gen code from sonar qube coverage from duplications
rahul-lohra Apr 10, 2025
ff1dab0
feat: ignore auto gen code from sonar qube coverage from duplications
rahul-lohra Apr 10, 2025
81136bb
Merge branch 'develop' into feature/rahullohra/add_default_values
aleksandar-apostolov Apr 14, 2025
d230efe
Merge branch 'develop' into feature/rahullohra/add_default_values
aleksandar-apostolov Apr 15, 2025
2fcf1d3
Merge branch 'develop' into feature/rahullohra/add_default_values
aleksandar-apostolov Jul 28, 2025
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
Expand Up @@ -14,7 +14,7 @@ class SpotlessConventionPlugin : Plugin<Project> {
target("**/*.kt")
targetExclude(
"**/build/**/*.kt", // Build directory
"**/org/openapitools/client/**/*.kt" // OpenAPI generated code
"**/io/getstream/android/video/generated/**/*.kt" // Open Api generated code
)
ktlint()
.editorConfigOverride(
Expand All @@ -28,15 +28,15 @@ class SpotlessConventionPlugin : Plugin<Project> {
}
format("openapiGenerated") {
target("**/*.kt")
targetExclude("**/build/**/*.kt")
targetExclude("**/build/**/*.kt", "**/io/getstream/android/video/generated/**/*.kt")
trimTrailingWhitespace()
endWithNewline()
licenseHeaderFile(rootProject.file("$rootDir/spotless/copyright.kt"),
KotlinConstants.LICENSE_HEADER_DELIMITER)
}
format("kts") {
target("**/*.kts")
targetExclude("**/build/**/*.kts")
targetExclude("**/build/**/*.kts", "**/io/getstream/android/video/generated/**/*.kt")
// Look for the first line that doesn't have a block comment (assumed to be the license)
licenseHeaderFile(
rootProject.file("spotless/copyright.kts"),
Expand Down
8 changes: 4 additions & 4 deletions generate_openapi_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ REPO_URL="git@github.com:GetStream/chat.git"
REFERENCE_TYPE="branch"
REFERENCE_VALUE="feature/rahullohra/kotlin_open_api_generator"
API_SERVICE_CLASS_NAME="ApiService"
MODEL_PACKAGE="org.openapitools.autogenerated.client.models"
API_SERVICE_PACKAGE="org.openapitools.autogenerated.client.apis"
MODEL_PACKAGE="io.getstream.android.video.generated.models"
API_SERVICE_PACKAGE="io.getstream.android.video.generated.apis"
MODEL_DIR="models"
API_SERVICE_DIR="apis"
MOSHI_ADAPTER_DIR="infrastructure"
MOSHI_ADAPTER_PACKAGE="org.openapitools.autogenerated.client.infrastructure"
MOSHI_ADAPTER_PACKAGE="io.getstream.android.video.generated.infrastructure"
CLASSES_TO_SKIP="PrivacySettingsResponse,PrivacySettings"
KEEP_CLASSES="WSAuthMessageRequest.kt"
OUTPUT_CLIENT_PATH="./stream-video-android-core/src/main/kotlin/org/openapitools/client"
OUTPUT_CLIENT_PATH="./stream-video-android-core/src/main/kotlin/io/getstream/android/video/generated"

# Parse key-value arguments
for arg in "$@"; do
Expand Down
2 changes: 2 additions & 0 deletions scripts/coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if (!rootProject.ext.sonar.ignoreModules.contains(name)) {
currentProject {
instrumentation {
excludedClasses.addAll(
"io.getstream.android.video.generated.models.*",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Won't the next line cover this path as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes you are right, I will remove this line.

"io.getstream.android.video.generated.*",
"io.getstream.video.android.core.model.*"
)
Expand All @@ -36,6 +37,7 @@ if (!rootProject.ext.sonar.ignoreModules.contains(name)) {
property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/kover/reportDebug.xml"
property "sonar.sources", "src/main/kotlin"
property "sonar.coverage.exclusions", "**/generated/**,**/io/getstream/video/android/core/model/**"
property "sonar.cpd.exclusions", "**/generated/**,**/io/getstream/video/android/core/model/**"
}
}
}
10 changes: 5 additions & 5 deletions scripts/open-api-code-gen.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ tasks.register<Exec>("generateOpenApiClient") {

val repoUrl = project.findProperty("repoUrl") as? String ?: "git@github.com:GetStream/chat.git"
val refType = project.findProperty("refType") as? String ?: "branch"
val refValue = project.findProperty("refValue") as? String ?: "feature/rahullohra/kotlin_open_api_generator"
val refValue = project.findProperty("refValue") as? String ?: "feature/rahullohra/add_default_values"

val modelPackageName = project.findProperty("modelPackage") as? String ?: "org.openapitools.client.models"
val modelPackageName = project.findProperty("modelPackage") as? String ?: "io.getstream.android.video.generated.models"
val modelsDir = project.findProperty("modelsDir") as? String ?: "models"

val apiServicePackageName = project.findProperty("apiServicePackage") as? String ?: "org.openapitools.client.apis"
val apiServicePackageName = project.findProperty("apiServicePackage") as? String ?: "io.getstream.android.video.generated.apis"
val apiServiceClassName = project.findProperty("apiServiceClassName") as? String ?: "ProductvideoApi"
val apiServiceDir = project.findProperty("apiServiceDir") as? String ?: "apis"

val moshiAdaptersDir = project.findProperty("moshiAdaptersDir") as? String ?: "infrastructure"
val moshiAdapterPackage = project.findProperty("moshiAdapterPackageName") as? String ?: "org.openapitools.client.infrastructure"
val moshiAdapterPackage = project.findProperty("moshiAdapterPackageName") as? String ?: "io.getstream.android.video.generated.infrastructure"

val classesToSkip = project.findProperty("classesToSkip") as? String ?: "PrivacySettingsResponse,PrivacySettings,StopRTMPBroadcastsRequest"

// val outputSpec = project.findProperty("outputSpec") as? String ?: "./releases/video-openapi-clientside"
val outputClient = project.findProperty("outputClient") as? String ?: "stream-video-android-core/src/main/kotlin/org/openapitools/client/v3"
val outputClient = project.findProperty("outputClient") as? String ?: "stream-video-android-core/src/main/kotlin/io/getstream/android/video/generated"
val keepClasses = project.findProperty("keepClasses") as? String ?: "WSAuthMessageRequest.kt"
val buildDir = project.layout.buildDirectory.asFile.get()

Expand Down
4 changes: 3 additions & 1 deletion scripts/sonar.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ ext.sonar = [
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
'**/*Test*.*'
'**/*Test*.*',
'**/generated/**'
]
]

Expand All @@ -40,5 +41,6 @@ sonarqube {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.java.binaries", "${rootDir}/**/build/tmp/kotlin-classes/debug"
property "sonar.coverage.exclusions", rootProject.ext.sonar.excludeFilter
property "sonar.cpd.exclusions", rootProject.ext.sonar.excludeFilter
}
}
Loading