• @atheken
    link
    2
    edit-2
    11 months ago

    Sorry, I didn’t mean to reference the detail member, I meant “extension members” as defined in the RFC.

    In the RFC, they are outlined as top-level elements. In the version I proposed, these are bundled up inside of an optional context member. This can be useful in making the serialization and deserialization process a little bit easier to implement in languages that support generics without the need to subclass for the common elements. The RFC specifically defines “extension members” as optional. The key difference is that in what I was describing, they’d be bundled into one object, rather than being siblings of the top-level response.

    It also side-steps any future top-level reserved keyword collisions by keeping “user-defined” members a separate box.

    You seem to be laboring under the notion that this spec produces something that can be entirely negotiated by generic clients, but I don’t see that at all. Even for “trivial” examples (multiple validation errors, or rate-limiting thottling), clients would need to implement specialized handlers, which is only vaguely touched upon by the need to have a “problem registry”.

    And, like it or not, considering how easy or messy it is for a downstream client to consume a result is actually an important part of API design. I don’t see how considering the browser, javascript, and the Fetch API behavior aren’t relevent considerations when we’re talking about extending HTTP with JSON responses.

    Did you author this RFC? I don’t exactly understand why you seem to be taking the criticism personally.