-
Notifications
You must be signed in to change notification settings - Fork 451
refactor(parser): Improve AppSync models with examples and descriptions #7330
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
Open
dcabib
wants to merge
8
commits into
aws-powertools:develop
Choose a base branch
from
dcabib:feat/parser-improve-appsync-models
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
refactor(parser): Improve AppSync models with examples and descriptions #7330
dcabib
wants to merge
8
commits into
aws-powertools:develop
from
dcabib:feat/parser-improve-appsync-models
+252
−51
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enhances the AppSync parser models with field descriptions and examples using Pydantic's Field() functionality. This improvement provides better documentation and metadata for AppSync event parsing, following the pattern established in previous PRs. All field descriptions are based on official AWS AppSync documentation and include realistic examples from actual test events. Closes aws-powertools#7122
- Sanitize JWT token examples to use generic placeholders - Remove authorization header from examples to avoid hardcoded credentials - Replace sensitive UUIDs with generic placeholders - Address SonarQube security hotspots while maintaining example clarity
…spots - Remove token_use and auth_time fields from JWT claims examples - Sanitize OIDC subject identifier examples - Address remaining SonarCloud security concerns while maintaining example clarity
…hotspots - Simplify JWT claims examples to minimal required fields - Remove complex nested authentication data - Keep examples clear but security-compliant - Final resolution of SonarCloud security concerns
…tspots - Remove JWT claims examples that trigger security hotspots - Keep comprehensive field descriptions for developer guidance - Maintain functionality while ensuring security compliance - Final resolution of all SonarCloud security concerns
- Replace all hardcoded IP addresses with localhost and private network examples - Use 127.0.0.1 and 10.0.0.x addresses to avoid SonarCloud security hotspots - Addresses SonarCloud security concerns about hardcoded IP addresses - Final resolution of all security hotspots
…tspots - Remove all IP address examples from sourceIp fields and headers - Keep comprehensive field descriptions for developer guidance - Maintain functionality while ensuring complete security compliance - Final resolution of all SonarCloud security hotspots
- Format appsync.py file according to project standards using Ruff - Fix 13 additional linting issues automatically - Ensure all 1167 files pass formatting checks - Resolves GitHub Actions workflow failure in PR aws-powertools#7330
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: #7122
Summary
Enhances the AppSync parser models with field descriptions and examples using Pydantic's Field() functionality. This improvement provides better documentation and metadata for AppSync event parsing, following the pattern established in previous PRs.
Changes
Added Field() descriptions and examples to all AppSync parser model classes:
All field descriptions are based on official AWS AppSync documentation
Examples sourced from actual test events and AWS documentation
Maintains 100% backward compatibility - no breaking changes to type annotations or validation logic
Follows best practices from successful PRs (default=None pattern for Optional fields)
User experience
Customers will be able to see examples and descriptions when using AppSync parser models, providing:
Checklist
Is this a breaking change? No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.
Closes #7122