Skip to content

Commit

Permalink
fix(specs): browse response required properties
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3348

Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
algolia-bot and millotp committed Jul 11, 2024
1 parent f4d8832 commit 5b7537f
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */
package com.algolia.client.model.ingestion

import kotlinx.serialization.*
import kotlinx.serialization.json.*

/**
* DockerStreamsInput
*
* @param streams
*/
@Serializable
public data class DockerStreamsInput(

@SerialName(value = "streams") val streams: JsonObject,
) : TaskInput

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlinx.serialization.json.*
* @param mapping
*/
@Serializable
public data class StreamingUtilsInput(
public data class StreamingInput(

@SerialName(value = "mapping") val mapping: MappingInput,
) : TaskInput
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ import kotlinx.serialization.json.*
* Configuration of the task, depending on its type.
*
* Implementations:
* - [OnDemandDateUtilsInput]
* - [ScheduleDateUtilsInput]
* - [DockerStreamsInput]
* - [ShopifyInput]
* - [StreamingUtilsInput]
* - [StreamingInput]
*/
@Serializable(TaskInputSerializer::class)
public sealed interface TaskInput {
Expand All @@ -28,9 +27,8 @@ public sealed interface TaskInput {
internal class TaskInputSerializer : JsonContentPolymorphicSerializer<TaskInput>(TaskInput::class) {
override fun selectDeserializer(element: JsonElement): DeserializationStrategy<TaskInput> {
return when {
element is JsonObject -> OnDemandDateUtilsInput.serializer()
element is JsonObject -> ScheduleDateUtilsInput.serializer()
element is JsonObject -> StreamingUtilsInput.serializer()
element is JsonObject -> StreamingInput.serializer()
element is JsonObject -> DockerStreamsInput.serializer()
element is JsonObject -> ShopifyInput.serializer()
else -> throw AlgoliaClientException("Failed to deserialize json element: $element")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import kotlinx.serialization.json.*
* @param transformationID Universally unique identifier (UUID) of a transformation.
* @param code The source code of the transformation.
* @param name The uniquely identified name of your transformation.
* @param description A descriptive name for your transformation of what it does.
* @param createdAt Date of creation in RFC 3339 format.
* @param description A descriptive name for your transformation of what it does.
* @param updatedAt Date of last update in RFC 3339 format.
*/
@Serializable
Expand All @@ -26,12 +26,12 @@ public data class Transformation(
/** The uniquely identified name of your transformation. */
@SerialName(value = "name") val name: String,

/** A descriptive name for your transformation of what it does. */
@SerialName(value = "description") val description: String,

/** Date of creation in RFC 3339 format. */
@SerialName(value = "createdAt") val createdAt: String,

/** A descriptive name for your transformation of what it does. */
@SerialName(value = "description") val description: String? = null,

/** Date of last update in RFC 3339 format. */
@SerialName(value = "updatedAt") val updatedAt: String? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ public data class TransformationCreate(
@SerialName(value = "name") val name: String,

/** A descriptive name for your transformation of what it does. */
@SerialName(value = "description") val description: String,
@SerialName(value = "description") val description: String? = null,
)

0 comments on commit 5b7537f

Please sign in to comment.