swift-openapi-generator icon indicating copy to clipboard operation
swift-openapi-generator copied to clipboard

Remove `Hashable` from `ServerSentEvent` and `ServerSentEventWithJSONData`

Open AFutureD opened this issue 6 months ago • 0 comments

Motivation

In ServerSentEventWithJSONData, the generic JSONDataType may not guaranteed to conform to Hashable.

For example, there are a lot of packages can be found on GitHub for JsonSchema, and they all do not conform to Hashable.

And, the decoder or deserializer may not need Hashable constraint.

some packages list below:

  1. https://github.com/kylef/JSONSchema.swift/blob/master/Sources/JSONSchema.swift
  2. https://github.com/objecthub/swift-dynamicjson/blob/main/Sources/DynamicJSON/JSONSchema/JSONSchema.swift

Proposed solution

Remove Hashable from ServerSentEvent and ServerSentEventWithJSONData.

Alternatives considered

No response

Additional information

No response

AFutureD avatar Jul 14 '25 02:07 AFutureD