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

Lookup QueryParameters from schema #1575

Merged
merged 2 commits into from
May 31, 2023

Conversation

andrueastman
Copy link
Member

@andrueastman andrueastman commented May 29, 2023

This PR updates the snippetCodeGraph to lookup queryParameters from the reference schema/openapi file as opposed to using the naming from the input http request.

This is will reduce errors in generation due to different casing and types as the generated builders will use the casing and types from the reference document.

https://learn.microsoft.com/en-us/graph/api/user-list-mailfolders?view=graph-rest-1.0&tabs=csharp

Also closes #1567 where filter clauses would have the filter statement in the event the filter statement involved a referencing nested property using the / character

https://github.com/microsoftgraph/microsoft-graph-docs-contrib/issues/1184

Generation diff viewable at https://github.com/microsoftgraph/microsoft-graph-docs/compare/preview-snippet-generation/115791..preview-snippet-generation/115848?expand=1

@andrueastman andrueastman force-pushed the andrueastman/snippetGenerationFixes branch from 372919b to 044af6e Compare May 30, 2023 08:30
@andrueastman andrueastman force-pushed the andrueastman/snippetGenerationFixes branch from 044af6e to d8878a5 Compare May 30, 2023 09:26
@andrueastman andrueastman self-assigned this May 30, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

86.4% 86.4% Coverage
0.0% 0.0% Duplication

@andrueastman andrueastman marked this pull request as ready for review May 30, 2023 09:59
@andrueastman andrueastman requested a review from a team as a code owner May 30, 2023 09:59
@andrueastman andrueastman enabled auto-merge (squash) May 30, 2023 10:00
@andrueastman andrueastman merged commit d169b5c into dev May 31, 2023
8 checks passed
@andrueastman andrueastman deleted the andrueastman/snippetGenerationFixes branch May 31, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenApi snippet generator incorrectly parse filter clause.
2 participants