Mike Grima

Results 80 comments of Mike Grima

I also tried overriding the `.json()` function (with the excellent suggestion from @reallistic). However, fastapi's `jsonable_encoder` doesn't call that either.

@ycd Thank you! I have confirmed that it does fix my bug. Would you like me to close this issue or keep it open until the PR is merged? EDIT:...

Sure, for the second part, take the `SomeModel` object: ```python class SomeModel(BaseModel): stuff: Set[str] = ... def json(*args, **kwargs): # MY LOGIC HERE return json_str ``` If you override the...

I'm now trying to figure out the best way to get a `sort_keys=True` somehow passed into the JSON generation. I'm unsure of the best way to do that. EDIT: It's...

To help close the loop, if you wanted to have sorted JSON results back, you would need to have something that looks like this: ```python import json import typing from...

@lafrech It would be de-serializing from JSON. The implementation would be similar to Pydantic's.

If you're willing to write the code for it 👍

I don't know much about resource groups. Is it basically just a mapping of ARN and Resource Type? If so, then it's very similar to what I did for Config...

Yup, that seems right. You'll need to do something similar to what was done here: https://github.com/spulec/moto/blob/master/moto/config/models.py#L62