Skip to content

Commit

Permalink
fix: remove permanently changing example for datetimes (#406)
Browse files Browse the repository at this point in the history
* fix: avoids changing the schema everytime it's calculated

* fix: avoids changing the schema everytime it's calculated
  • Loading branch information
Mokto authored Mar 18, 2024
1 parent a03c327 commit 87c3902
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions odmantic/bson.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ def validate_mongo_datetime(
def __get_pydantic_json_schema__(
cls, _core_schema: core_schema.CoreSchema, handler: GetJsonSchemaHandler
) -> JsonSchemaValue:
schema = handler(core_schema.datetime_schema())
schema.update(example=datetime.utcnow().isoformat())
return schema
return handler(core_schema.datetime_schema())


class _decimalDecimalPydanticAnnotation:
Expand Down

0 comments on commit 87c3902

Please sign in to comment.