-
Notifications
You must be signed in to change notification settings - Fork 23
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 x-ms-enum's default to SwaggerObject. #9
Conversation
…odeModel as EnumType with modelAsString: true
@amarzavery, |
fixes Azure/autorest#1449 |
The last commit is expected to fail as it is dependent on a change made in autorest.common in this PR Azure/autorest.common#11 |
@@ -56,9 +56,11 @@ public virtual IModelType BuildServiceType(string serviceTypeName) | |||
type.XmlProperties = (SwaggerObject as Schema)?.Xml; | |||
type.Format = SwaggerObject.Format; | |||
var xMsEnum = SwaggerObject.Extensions.GetValue<JToken>(Core.Model.XmsExtensions.Enum.Name); | |||
if ((SwaggerObject.Enum != null || xMsEnum != null) && type.KnownPrimaryType == KnownPrimaryType.String && !(IsSwaggerObjectConstant(SwaggerObject))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing this check type.KnownPrimaryType == KnownPrimaryType.String
. Since we want to support enums of different primary types.
release joberror
|
No description provided.