Skip to content

Shall we disable seal-single-value-enum-by-default for the generation? #3378

@kazrael2119

Description

@kazrael2119

In this case:
https://github.com/Azure/sdk-release-request/issues/6319#issuecomment-3061041111
Not all cases require intervalUnit but our code set it with a default value, So the request failed.

intervalUnit is a enum that only has single value, and in swagger, this enum's modelAsString is false https://github.com/Azure/azure-rest-api-specs/blob/main/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/storageTaskAssignments.json#L578-L586
So the generated code will be like:

interface xxx {
   intervalUnit?: "Days"
}

and our codegen always enables seal-single-value-enum-by-default as true
So the property intervalUnit will have a default value "Days"

Metadata

Metadata

Assignees

Labels

CodeGenIssues that relate to code generationHRLCp0priority 0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions