Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for serde_repr #52

Closed
wants to merge 3 commits into from
Closed

add support for serde_repr #52

wants to merge 3 commits into from

Conversation

ThouCheese
Copy link

This pull request adds preliminary support for serde_repr by adding a corresponding JsonSchema_repr macro as we discussed in #35. I say preliminary because it throws away all info encoded in the variable names. Ideally, when JsonSchema_repr is on an enum with for example:

#[derive(JsonSchema_repr)]
enum StatusCode {
    /// The process exited successfully.
    Success = 0,
    // variants ...
}

The documentation should say "* 0 - Success: The process exited successfully." I'm not too sure how to go about doing this however, so any guidance would be appreciated :).

Also, this is my first time working with the proc macro api, so I checked everything and it seemed to report okay error messages, but if there is something wrong, please let me know.

@GREsau GREsau mentioned this pull request Mar 25, 2021
@GREsau
Copy link
Owner

GREsau commented Mar 25, 2021

This functionality has now been implemented in #76

@GREsau GREsau closed this Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants