Skip to content

Commit

Permalink
update example output
Browse files Browse the repository at this point in the history
  • Loading branch information
koxudaxi committed Jul 23, 2019
1 parent 1ea2d68 commit 50adb25
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,25 +182,38 @@ components:

`model.py`:
```python
# generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-23T14:23:18+00:00

from typing import List, Optional

from pydantic import BaseModel



class Pet(BaseModel):
id: int
name: str
tag: str = None
tag: Optional[str] = None


class Pets(BaseModel):
__root__: List[Pet]

Pets = List[Pet]

class Error(BaseModel):
code: int
message: str


class api(BaseModel):
apiKey: str = None
apiVersionNumber: str = None
apiKey: Optional[str] = None
apiVersionNumber: Optional[str] = None


apis = List[api]
class apis(BaseModel):
__root__: List[api]
```

## Development
Expand Down

0 comments on commit 50adb25

Please sign in to comment.