newtype-uuid icon indicating copy to clipboard operation
newtype-uuid copied to clipboard

draft proposal for how we might add the x-rust-type extension

Open ahl opened this issue 1 year ago • 2 comments

@sunshowers I'm posting this as an artifact for us to discuss next week as your time permits.

It depends on the version of typify that's still unreleased so obviously would need to wait for that.

ahl avatar May 11 '24 03:05 ahl

Updating this:

Rain's suggestion for a macro to define these types was something along these lines:

impl_typed_uuid_kind! {
    json_schema_settings = {
        crate = "my-crate",
        path = "my_crate",
    };

    Collection => { version = "0.1.0", tag = "collection", kind = CollectionKind, short = CollectionUuid },
    Downstairs => { version = "0.1.0", tag = "downstairs", kind = DownstairsKind, short = DownstairsUuid },
    // ...
}

We might simplify that a bit to make it easier to parse with serde_tokenstream, but that's the general idea.

ahl avatar Jun 28 '24 21:06 ahl

This would still be wonderful.

sunshowers avatar Oct 08 '24 01:10 sunshowers