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

docs(parser): add JSON string field extension example #1526

Merged
merged 5 commits into from
Sep 23, 2022

Conversation

rubenfonseca
Copy link
Contributor

@rubenfonseca rubenfonseca commented Sep 20, 2022

Issue number: #1518

Summary

Changes

Please provide a summary of what's being changed

This PR adds a small tip to the parser documentation, highlighting how to override a string field containing Json.

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

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.


View rendered docs/utilities/parser.md

@rubenfonseca rubenfonseca requested a review from a team as a code owner September 20, 2022 13:59
@rubenfonseca rubenfonseca requested review from heitorlessa and removed request for a team September 20, 2022 13:59
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Sep 20, 2022
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 20, 2022
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

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

Ask to change to code snippet and to make it run as-is

docs/utilities/parser.md Show resolved Hide resolved
When extending a `string` field containing JSON, you need to wrap the field
with [Pydantic's Json Type](https://pydantic-docs.helpmanual.io/usage/types/#json-type):

```python
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you create as a snippet file so it runs as-is?

I'd like to prevent us from getting into where we were before with typos, and customers copying/pasting code that doesn't run

@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 22, 2022
@rubenfonseca
Copy link
Contributor Author

@heitorlessa created two samples and referenced them in the docs, ready for another review

@heitorlessa heitorlessa self-assigned this Sep 23, 2022
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

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

tiny fix to make mypy only ignore the assignment error as opposed to any other potential issues. Accepting them and merging it - THANKS A LOT!

@heitorlessa heitorlessa merged commit 1ebb019 into aws-powertools:develop Sep 23, 2022
@rubenfonseca rubenfonseca deleted the chore/1518 branch September 23, 2022 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants