diff --git a/api-core/src/main/java/com/vimeo/networking2/VimeoCallback.kt b/api-core/src/main/java/com/vimeo/networking2/VimeoCallback.kt index 22749accd..38886e5a5 100644 --- a/api-core/src/main/java/com/vimeo/networking2/VimeoCallback.kt +++ b/api-core/src/main/java/com/vimeo/networking2/VimeoCallback.kt @@ -31,15 +31,14 @@ interface VimeoCallback { /** * A successful API response. * - * @param response Data returned by the API. + * @param response Data returned by the API. */ fun onSuccess(response: VimeoResponse.Success) /** * An error occurred when making the request. * - * @param error Information on the error. This error could be due to an exception thrown or - * parsing response error. + * @param error Information on the error. This error could be due to an exception thrown or parsing response error. */ fun onError(error: VimeoResponse.Error) } diff --git a/detekt.yml b/detekt.yml index 0ecc1b42d..3f9f8e403 100644 --- a/detekt.yml +++ b/detekt.yml @@ -1,6 +1,6 @@ # Fail build if any issues are found build: - maxIssues: 1 + maxIssues: 0 # # Configure detekt's 8 different rulesets (comments, complexity, empty-blocks, exceptions, naming, performance, diff --git a/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/GenerateModelsExtension.kt b/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/GenerateModelsExtension.kt index 043cf50f8..25033a940 100644 --- a/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/GenerateModelsExtension.kt +++ b/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/GenerateModelsExtension.kt @@ -3,7 +3,7 @@ package com.vimeo.modelgenerator import org.gradle.api.Project /** - * Extension object that is used to configure the [GenerateModelsPlugin]. + * Extension object that is used to configure the [GenerateModelsPlugin]. */ open class GenerateModelsExtension(private val project: Project) { diff --git a/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/PsiToPoetHelpers.kt b/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/PsiToPoetHelpers.kt index 540e5ae28..b9f50be58 100644 --- a/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/PsiToPoetHelpers.kt +++ b/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/PsiToPoetHelpers.kt @@ -22,7 +22,7 @@ private const val LAMBDA = "->" * like [KtProperty] or [KtNamedFunction]. * * @param annotations a list of [KtAnnotationEntry] that can be pulled from most Kt - * prefixed objects, like [KtParameter] or [KtClass]. + * prefixed objects, like [KtParameter] or [KtClass]. * @param packageName the current package name of the worked on file. */ internal fun createAnnotations( @@ -248,8 +248,8 @@ internal fun createTypeName( * A recursive method that goes through the given list until completion and * creates a parameterized [TypeName] from it. * - * @param classes a list of [ClassNames][ClassName] that will be parameterized, specifically in order - * in which they should be parameterized. A list of (List, Foo, Bar) will output `List>` + * @param classes a list of [ClassNames][ClassName] that will be parameterized, specifically in order + * in which they should be parameterized. A list of (List, Foo, Bar) will output `List>` */ private fun createNestedParameterizedTypes(classes: MutableList): TypeName = if (classes.size == 1) { diff --git a/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/extensions/KotlinPoetExtensions.kt b/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/extensions/KotlinPoetExtensions.kt index b79af1a39..bf6927c76 100644 --- a/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/extensions/KotlinPoetExtensions.kt +++ b/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/extensions/KotlinPoetExtensions.kt @@ -35,7 +35,7 @@ internal fun FileSpec.Builder.addProperties(properties: List): Fil } /** - * Add a list of imports to the given [FileSpec]. + * Add a list of imports to the given [FileSpec]. * * @param imports a list of Imports. */ @@ -60,8 +60,8 @@ internal fun FileSpec.Builder.addAnnotations(annotations: List): * This can be applied to [FileSpec.Builder], [PropertySpec.Builder], [ParameterSpec.Builder] or any class that has * [Taggable.Builder] as a super. * - * @param condition a condition if met will add the [addition] to the given [Taggable.Builder]. - * @param addition a block of code that can be applied to the [Taggable.Builder] if the [condition] is met. + * @param condition a condition if met will add the [addition] to the given [Taggable.Builder]. + * @param addition a block of code that can be applied to the [Taggable.Builder] if the [condition] is met. */ internal fun > T.addIfConditionMet( condition: Boolean, @@ -71,9 +71,9 @@ internal fun > T.addIfConditionMet( } /** - * Parses [valArgs] to create parameters for AnnotationSpec.Builders [AnnotationSpec.Builder]. + * Parses [valArgs] to create parameters for AnnotationSpec.Builders [AnnotationSpec.Builder]. * - * @param valArgs a list of [ValueArgument]. + * @param valArgs a list of [ValueArgument]. */ internal fun AnnotationSpec.Builder.addMembers(valArgs: List): AnnotationSpec.Builder = apply { valArgs.toParams.forEach { addMember(it) } } @@ -124,4 +124,4 @@ internal fun FunSpec.Builder.addKdocs(docs: List): FunSpec.Builder = * @param docs a list of KDocs */ internal fun PropertySpec.Builder.addKdocs(docs: List): PropertySpec.Builder = - apply { docs.forEach { addKdoc(it) } } \ No newline at end of file + apply { docs.forEach { addKdoc(it) } } diff --git a/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/visitor/SerializableClassVisitor.kt b/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/visitor/SerializableClassVisitor.kt index 3d40a865d..1db95426f 100644 --- a/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/visitor/SerializableClassVisitor.kt +++ b/model-generator/plugin/src/main/java/com/vimeo/modelgenerator/visitor/SerializableClassVisitor.kt @@ -9,9 +9,9 @@ import org.jetbrains.kotlin.psi.KtClass import java.io.Serializable /** - * [ModifyVisitor] for [Serializable] code additions. + * [ModifyVisitor] for [Serializable] code additions. * - * This adds [Serializable] as a class super as well as adding a companion object with a serialVersionUID. + * This adds [Serializable] as a class super as well as adding a companion object with a serialVersionUID. */ class SerializableClassVisitor : ModifyVisitor { diff --git a/models/detekt_baseline.xml b/models/detekt_baseline.xml index cf337bf92..720202054 100644 --- a/models/detekt_baseline.xml +++ b/models/detekt_baseline.xml @@ -124,6 +124,7 @@ UndocumentedPublicProperty:DashVideoFile.kt$DashVideoFile$/** * The token used for DRM protected streams. */ @Internal @Json(name = "token") val token: String? = null UndocumentedPublicProperty:Document.kt$Document$/** * The partially stripped html for documents like the terms of service. */ @Json(name = "html") val html: String? = null UndocumentedPublicProperty:Drm.kt$Drm$/** * The video file containing the info about the DRM protected stream. */ @Json(name = "widevine") val widevine: DashVideoFile? = null + UndocumentedPublicProperty:EditSession.kt$EditSession$/** * Whether the current version of clip is of max resolution. */ @Json(name = "is_max_resolution") val isMaxResolution: Boolean? = null UndocumentedPublicProperty:EditSession.kt$EditSession$/** * Whether the video has licensed music. */ @Json(name = "is_music_licensed") val isMusicLicensed: Boolean? = null UndocumentedPublicProperty:Email.kt$Email$@Json(name = "email") val email: String? = null UndocumentedPublicProperty:EmbedButtons.kt$EmbedButtons$/** * Whether the Embed button appears in the embeddable player for this video. */ @Json(name = "embed") val embed: Boolean? = null @@ -160,6 +161,7 @@ UndocumentedPublicProperty:Folder.kt$Folder$/** * The folder's metadata. */ @Json(name = "metadata") val metadata: Metadata<FolderConnections, BasicInteraction>? = null UndocumentedPublicProperty:Folder.kt$Folder$/** * The folder's owner. */ @Json(name = "user") val user: User? = null UndocumentedPublicProperty:Folder.kt$Folder$/** * The language preference for Slack notifications about the folder. * @see slackLanguagePreferenceType */ @Json(name = "slack_language_preference") val slackLanguagePreference: String? = null + UndocumentedPublicProperty:Folder.kt$Folder$/** * The link to the folder on Vimeo. */ @Json(name = "link") val link: String? = null UndocumentedPublicProperty:Folder.kt$Folder$/** * The name of the folder. */ @Json(name = "name") val name: String? = null UndocumentedPublicProperty:Folder.kt$Folder$/** * The resource key string of the folder. */ @Json(name = "resource_key") val resourceKey: String? = null UndocumentedPublicProperty:Folder.kt$Folder$/** * The time in ISO 8601 format when a user last performed an action on the folder. */ @Json(name = "last_user_action_event_date") val lastUserActionEventDate: Date? = null @@ -636,6 +638,7 @@ UndocumentedPublicProperty:Video.kt$Video$/** * The video's privacy setting. */ @Json(name = "privacy") val privacy: Privacy? = null UndocumentedPublicProperty:Video.kt$Video$/** * The video's title. */ @Json(name = "name") val name: String? = null UndocumentedPublicProperty:Video.kt$Video$/** * The video's width in pixels. */ @Json(name = "width") val width: Int? = null + UndocumentedPublicProperty:Video.kt$Video$/** * Whether the clip is playable. */ @Json(name = "is_playable") val isPlayable: Boolean? = null UndocumentedPublicProperty:VideoBadge.kt$VideoBadge$/** * The badge image. */ @Json(name = "pictures") val pictures: PictureCollection? = null UndocumentedPublicProperty:VideoBadge.kt$VideoBadge$/** * The festival that this badge represents. */ @Internal @Json(name = "festival") val festival: String? = null UndocumentedPublicProperty:VideoBadge.kt$VideoBadge$/** * The link for the badge */ @Json(name = "link") val link: String? = null diff --git a/models/src/main/java/com/vimeo/networking2/ApiError.kt b/models/src/main/java/com/vimeo/networking2/ApiError.kt index 188eefc41..8b80c9856 100644 --- a/models/src/main/java/com/vimeo/networking2/ApiError.kt +++ b/models/src/main/java/com/vimeo/networking2/ApiError.kt @@ -8,8 +8,8 @@ import com.vimeo.networking2.enums.ErrorCodeType import com.vimeo.networking2.enums.asEnum /** - * This class represents an error response from the Vimeo API. It holds useful getters to - * understand why your request might have failed. + * This class represents an error response from the Vimeo API. It holds useful getters to + * understand why your request might have failed. */ @JsonClass(generateAdapter = true) data class ApiError( diff --git a/models/src/main/java/com/vimeo/networking2/Folder.kt b/models/src/main/java/com/vimeo/networking2/Folder.kt index 10d8a4674..523a2a620 100644 --- a/models/src/main/java/com/vimeo/networking2/Folder.kt +++ b/models/src/main/java/com/vimeo/networking2/Folder.kt @@ -42,19 +42,19 @@ data class Folder( val metadata: Metadata? = null, /** - * The time in ISO 8601 format when the folder was last modified. + * The time in ISO 8601 format when the folder was last modified. */ @Json(name = "modified_time") val lastModifiedDate: Date? = null, /** - * The name of the folder. + * The name of the folder. */ @Json(name = "name") val name: String? = null, /** - * The [FolderPrivacy] that defines the public visibility of the folder. + * The [FolderPrivacy] that defines the public visibility of the folder. */ @Json(name = "privacy") val privacy: FolderPrivacy? = null, diff --git a/models/src/main/java/com/vimeo/networking2/ProjectItem.kt b/models/src/main/java/com/vimeo/networking2/ProjectItem.kt index fb61a78f5..14937b7ad 100644 --- a/models/src/main/java/com/vimeo/networking2/ProjectItem.kt +++ b/models/src/main/java/com/vimeo/networking2/ProjectItem.kt @@ -14,19 +14,19 @@ import com.vimeo.networking2.enums.asEnum data class ProjectItem( /** - * The type of the item. + * The type of the item. */ @Json(name = "type") val rawType: String? = null, /** - * The item is [Folder] if [type] == [ProjectItemType.FOLDER], `null` otherwise. + * The item is [Folder] if [type] == [ProjectItemType.FOLDER], `null` otherwise. */ @Json(name = "folder") val folder: Folder? = null, /** - * The item is [Video] if [type] == [ProjectItemType.VIDEO], `null` otherwise. + * The item is [Video] if [type] == [ProjectItemType.VIDEO], `null` otherwise. */ @Json(name = "video") val video: Video? = null diff --git a/models/src/main/java/com/vimeo/networking2/PublishJobBlockers.kt b/models/src/main/java/com/vimeo/networking2/PublishJobBlockers.kt index 742e8ec6e..0e3e58b07 100644 --- a/models/src/main/java/com/vimeo/networking2/PublishJobBlockers.kt +++ b/models/src/main/java/com/vimeo/networking2/PublishJobBlockers.kt @@ -21,8 +21,8 @@ data class PublishJobBlockers( val facebook: List? = null, /** - * The list of blockers keeping this video from being uploaded to YouTube. - * @see PublishJobBlockers.youTubeTypes + * The list of blockers keeping this video from being uploaded to YouTube. + * @see PublishJobBlockers.youTubeTypes */ @Json(name = "youtube") diff --git a/models/src/main/java/com/vimeo/networking2/Video.kt b/models/src/main/java/com/vimeo/networking2/Video.kt index f1eac357d..330dc86bf 100644 --- a/models/src/main/java/com/vimeo/networking2/Video.kt +++ b/models/src/main/java/com/vimeo/networking2/Video.kt @@ -239,7 +239,7 @@ data class Video( val width: Int? = null, /** - * Information about the Vimeo Create session of a video. + * Information about the Vimeo Create session of a video. */ @Json(name = "edit_session") val editSession: EditSession? = null, diff --git a/models/src/main/java/com/vimeo/networking2/common/Page.kt b/models/src/main/java/com/vimeo/networking2/common/Page.kt index 8e9b9c333..54468983f 100644 --- a/models/src/main/java/com/vimeo/networking2/common/Page.kt +++ b/models/src/main/java/com/vimeo/networking2/common/Page.kt @@ -2,9 +2,9 @@ package com.vimeo.networking2.common /** - * Represents a single non-pageable list of data. + * Represents a single non-pageable list of data. * - * @see [Pageable] for lists of data that support pagination. + * @see [Pageable] for lists of data that support pagination. */ interface Page { diff --git a/models/src/main/java/com/vimeo/networking2/params/BatchPublishToSocialMedia.kt b/models/src/main/java/com/vimeo/networking2/params/BatchPublishToSocialMedia.kt index bba33a34b..448ea4577 100644 --- a/models/src/main/java/com/vimeo/networking2/params/BatchPublishToSocialMedia.kt +++ b/models/src/main/java/com/vimeo/networking2/params/BatchPublishToSocialMedia.kt @@ -4,7 +4,7 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * Encapsulates publishing data for each of the supported social media platforms. + * Encapsulates publishing data for each of the supported social media platforms. */ @JsonClass(generateAdapter = true) data class BatchPublishToSocialMedia(