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 underlying type for EnumType #11

Merged
merged 2 commits into from
Sep 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "2.0.0"
}
}
8 changes: 8 additions & 0 deletions src/Model/EnumType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,13 @@ public override bool StructurallyEquals(IModelType other)
[JsonIgnore]
public override string ExtendedDocumentation
=> $"Possible values include: {string.Join(", ", Values.Select(v => $"'{v.Name}'"))}";

/// <summary>
/// The underlying type of a property or a parameter on which the
/// enum constraint or x-ms-enum extension is applied. This enables support
/// for enums of other primary types like Integer, Decimal, Boolean apart
// from string.
/// </summary>
public PrimaryType UnderlyingType { get; set; }
}
}