-
Notifications
You must be signed in to change notification settings - Fork 11
fix: Changes to address the field name error: json shadows a BaseModel attribute #270
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
Conversation
"Json":{ | ||
"JsonFormat":{ | ||
"shape":"MonitoringJsonDatasetFormat", | ||
"documentation":"<p>The JSON dataset used in the monitoring job</p>" | ||
"documentation":"<p>The JSON dataset used in the monitoring job</p>", | ||
"alias": "json" | ||
}, |
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.
SO this is going to get overridden on the next botocore sync .
I think we should handle this condition in codegen engine
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.
Yes, this is handled in the codegen as well.
Updated the service json and shapes_extractor and shapes_codegen accordingly.
This file was generated using the codegen run in local.
…BaseModel attribute
…BaseModel attribute
Issue #, if available:
aws/sagemaker-python-sdk#4944
Description of changes:
Error details:
NameError: Field name "json" shadows a BaseModel attribute; use a different field name with "alias='json'"
Updated the shapes codegen scripts and service json file to handle the "alias" if included in a structure field type.
Test
pytest tst
from sagemaker.jumpstart.types import JumpStartLaunchedRegionInfo
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.