Skip to content

Nullable default properties must have null default value instead of EmptyJsonObject #353

@nerzhulart

Description

@nerzhulart

Example

@Serializable
public data class ServerCapabilities(
    val experimental: JsonObject? = EmptyJsonObject,
    val sampling: JsonObject? = EmptyJsonObject,
    val logging: JsonObject? = EmptyJsonObject,
    val prompts: Prompts? = null,
    val resources: Resources? = null,
    val tools: Tools? = null,
) 

The default options for logging is EmptyJsonObject. When not specified (assuming no logging support on server) it effecively sends "logging" : {} that treated by a client as logging is supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions