You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net: DefaultValue for OpenAPI payload properties (microsoft#4612)
### Motivation and Context
Currently, the default values of parameters in OpenAPI plugins have the
'string?' type, even though their original type specified in the OpenAPI
document schema might be different. A dedicated type conversion
functionality exists to convert from the original type to a string.
However, both the string type for the parameters/arguments and the type
conversion logic are no longer necessary, as SK has moved away from
string-type arguments and recently added support for .NET primitive
types and complex types.
Furthermore, the `RestApiOperationPayloadProperty` class does not have a
property for default values, so a default value specified in an OpenAPI
document is lost and cannot be accessed from the code.
### Description
1. The type of the `DefaultValue` property in the
`RestApiOperationParameter` class has been changed from string? to
object? to better represent the actual type of the parameter's default
value and eliminate unnecessary conversion to string.
2. A new `DefaultValue` property has been added to the
`RestApiOperationPayloadProperty`, making it consistent with the
RestApiOperationParameter class.
0 commit comments