-
Notifications
You must be signed in to change notification settings - Fork 214
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
CLI Generation to handle parameter of type 'string' but different format #4679
CLI Generation to handle parameter of type 'string' but different format #4679
Conversation
…yParameterType()
Hi @baywet, are there any further changes required for this PR? |
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.
@rohitkrsoni Any chance you could add a changelog entry to the Changelog file at the repository root?
Done, thanks :) |
@rohitkrsoni @andrueastman there seems to be a regression with this one see this smoke build (only microsoft people will see that) Has about 16k errors like this one : This seems to be caused by the fact that the option now is |
Ah, I missed the fact that Something like: private static CodeType GetQueryParameterType(OpenApiSchema schema)
{
var paramType = GetPrimitiveType(schema) ?? new()
{
IsExternal = true,
Name = schema.Items?.Type ?? schema.Type,
};
paramType.CollectionKind = schema.IsArray() ? CodeTypeBase.CodeTypeCollectionKind.Array : default,
return paramType;
} |
Hi @baywet, can I get the sample description file so that I can reproduce the issue on my local. I tried to reproduce the issue by adding a parameter mentioned below.
I didn't get any error but got this in Query Parameter properties: And the option created is:
Is this behavior expected? |
Thanks for the additional context @calebkiage |
@baywet sure leave that on me! |
fixes #4615
CLI Generator is unable to handle parameters such as
DateTime
,Date
, etc. More precisely, the parameters havingtype="string"
andformat="datetime"
,"date"
etc.Screenshots:
Tests:
Kiota Update:
Build of Sample project:
Change in the builder Class: