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 repr structs #1

Closed
Rexagon opened this issue Jun 25, 2020 · 0 comments
Closed

Add support for repr structs #1

Rexagon opened this issue Jun 25, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Rexagon
Copy link
Owner

Rexagon commented Jun 25, 2020

Currently simple C-like enums are serialized as string enums:

#[derive(Serialize)]
enum Test {
    First = 1,
    Second = 2,
}
type: string
enum:
  - First
  - Second
example: First

It should be something like this:

oneOf:
  - type: integer
    description: First variant
    example: 1
  - type: integer
    description: Second variant
    example: 2
@Rexagon Rexagon added the enhancement New feature or request label Jun 25, 2020
@Rexagon Rexagon self-assigned this Jun 25, 2020
@Rexagon Rexagon added this to the 1.0 milestone Jun 25, 2020
@Rexagon Rexagon closed this as completed Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant