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

Remove stringify from primitive types #5616

Merged
merged 36 commits into from
Oct 24, 2024

Conversation

shemogumbe
Copy link
Contributor

@shemogumbe shemogumbe commented Oct 16, 2024

Fixes #5417

From

async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[List[str]]:
        """
        Get names
        param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
        Returns: Optional[List[str]]
        """
        request_info = self.to_get_request_information(
            request_configuration
        )
        if not self.request_adapter:
            raise Exception("Http core is null") 
        return await self.request_adapter.send_collection_of_primitive_async(request_info, "str", None)

To

async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[List[str]]:
        """
        Get names
        param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
        Returns: Optional[List[str]]
        """
        request_info = self.to_get_request_information(
            request_configuration
        )
        if not self.request_adapter:
            raise Exception("Http core is null") 
        return await self.request_adapter.send_collection_of_primitive_async(request_info, str, None)

Note - the param type was fixed in an earlier PR for a related issue in September

@shemogumbe shemogumbe marked this pull request as ready for review October 16, 2024 14:25
@shemogumbe shemogumbe requested a review from a team as a code owner October 16, 2024 14:25
Copy link
Member

@andrueastman andrueastman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd also need a changelog entry for this as well...

.vscode/launch.json Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs Outdated Show resolved Hide resolved
@shemogumbe shemogumbe marked this pull request as draft October 21, 2024 12:03
@shemogumbe shemogumbe marked this pull request as ready for review October 22, 2024 13:44
CHANGELOG.md Outdated Show resolved Hide resolved
andrueastman
andrueastman previously approved these changes Oct 24, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making the changes!

Please make sure you squash.

Copy link

sonarcloud bot commented Oct 24, 2024

@shemogumbe shemogumbe merged commit 3fdc657 into main Oct 24, 2024
209 checks passed
@shemogumbe shemogumbe deleted the shem/remove_stringify_primitive_types branch October 24, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✔️
Development

Successfully merging this pull request may close these issues.

Incorrect primitive_type in generated code causes "Encountered an unknown type during deserialization str"
3 participants