Repository: ktorio/ktor
File: ktor-shared/ktor-openapi-schema/common/src/io/ktor/openapi/PathItem.kt (Kotlin)

Code before:
public data class PathItem(
    /** An optional, string summary, intended to apply to all operations in this path. */
    public val summary: String? = null,
    /**
     * An optional, string description, intended to apply to all operations in this path. CommonMark
     * syntax MAY be used for rich text representation.
     */
    public val description: String? = null,
    /** A definition of a PUT operation on this path. */
    public val put: Operation? = null,
    /** A definition of a POST operation on this path. */
    public val post: Operation? = null,
    /** A definition of a DELETE operation on this path. */
    public val delete: Operation? = null,
    /** A definition of an OPTIONS operation on this path. */
    public val options: Operation? = null,
    /** A definition of a GET operation on this path. */
    public val get: Operation? = null,
    /** A definition of a HEAD operation on this path. */
    public val head: Operation? = null,
    /** A definition of a PATCH operation on this path. */
    public val patch: Operation? = null,
    /** A definition of a TRACE operation on this path. */
    public val trace: Operation? = null,
    /** A definition of a QUERY operation on this path. */
    public val query: Operation? = null,
    /** An alternative server array to service all operations in this path. */
    public val servers: List<Server>? = null,
    /**
     * A list of parameters that are applicable for all the operations described under this path.
     * These parameters can be overridden at the operation level, but cannot be removed there. The
     * list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of
     * a name and location. The list can use the Reference Object to link to parameters that are
     * defined at the OpenAPI Object's components/parameters.
     */
    public val parameters: List<ReferenceOr<Parameter>>? = null,
    /** Specification extensions for this Path Item (keys MUST start with "x-"). */
    override val extensions: ExtensionProperties = null,
) : Extensible {
    public companion object {
        internal object Serializer : ExtensibleMixinSerializer<PathItem>(
            generatedSerializer(),
            { pi, extensions -> pi.copy(extensions = extensions) }
        )
    }
}


Review comment (suggestion):
Looks like we'll need to omit this change and include it in a separate 3.2 update for our OpenAPI models.

Code after:
public data class PathItem(
    /** An optional, string summary, intended to apply to all operations in this path. */
    public val summary: String? = null,
    /**
     * An optional, string description, intended to apply to all operations in this path. CommonMark
     * syntax MAY be used for rich text representation.
     */
    public val description: String? = null,
    /** A definition of a PUT operation on this path. */
    public val put: Operation? = null,
    /** A definition of a POST operation on this path. */
    public val post: Operation? = null,
    /** A definition of a DELETE operation on this path. */
    public val delete: Operation? = null,
    /** A definition of an OPTIONS operation on this path. */
    public val options: Operation? = null,
    /** A definition of a GET operation on this path. */
    public val get: Operation? = null,
    /** A definition of a HEAD operation on this path. */
    public val head: Operation? = null,
    /** A definition of a PATCH operation on this path. */
    public val patch: Operation? = null,
    /** A definition of a TRACE operation on this path. */
    public val trace: Operation? = null,
    /** An alternative server array to service all operations in this path. */
    public val servers: List<Server>? = null,
    /**
     * A list of parameters that are applicable for all the operations described under this path.
     * These parameters can be overridden at the operation level, but cannot be removed there. The
     * list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of
     * a name and location. The list can use the Reference Object to link to parameters that are
     * defined at the OpenAPI Object's components/parameters.
     */
    public val parameters: List<ReferenceOr<Parameter>>? = null,
    /** Specification extensions for this Path Item (keys MUST start with "x-"). */
    override val extensions: ExtensionProperties = null,
) : Extensible {
    public companion object {
        internal object Serializer : ExtensibleMixinSerializer<PathItem>(
            generatedSerializer(),
            { pi, extensions -> pi.copy(extensions = extensions) }
        )
    }
}