-
-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix test coverage * Fix test coverage * Update output.py * Fix test coverage * Fix coverage * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix coverage * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix coverage * Fix coverage * Fix coverage * Fix coverage * Fix coverage * Fix coverage * Fix coverage * Fix coverage * Fix coverage * Fix coverage --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ea22425
commit bec88d6
Showing
8 changed files
with
108 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
23 changes: 23 additions & 0 deletions
23
tests/data/expected/main/main_jsonschema_with_custom_formatters/output.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# generated by datamodel-codegen: | ||
# filename: person.json | ||
# timestamp: 2019-07-26T00:00:00+00:00 | ||
|
||
# MIT License | ||
# | ||
# Copyright (c) 2023 Blah-blah | ||
# | ||
from __future__ import annotations | ||
|
||
from typing import List, Optional | ||
|
||
from pydantic import BaseModel, Field, conint | ||
|
||
|
||
class Person(BaseModel): | ||
firstName: Optional[str] = Field(None, description="The person's first name.") | ||
lastName: Optional[str] = Field(None, description="The person's last name.") | ||
age: Optional[conint(ge=0)] = Field( | ||
None, description='Age in years which must be equal to or greater than zero.' | ||
) | ||
friends: Optional[List] = None | ||
comment: None = None |
This file contains 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