Generated intermediate models may shadow imports
See original GitHub issueHey, great library, thank you!
Describe the bug
See Optional
To Reproduce
Example schema:
components:
schemas:
Config:
properties:
optional:
type: object
additionalProperties:
type: array
items:
type: string
Used commandline:
$ datamodel-codegen --input-file-type openapi --strip-default-none --input test.yaml --output model.py
Produced:
from __future__ import annotations
from typing import Dict, List, Optional
from pydantic import BaseModel
class Optional(BaseModel):
__root__: List[str]
class Config(BaseModel):
optional: Optional[Dict[str, Optional]]
Version:
- OS: Windows 10
- Python version: 3.8
- datamodel-code-generator version: 0.7.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Python import: Advanced Techniques and Tips
The Python import system is as powerful as it is useful. In this in-depth tutorial, you'll learn how to harness this power to...
Read more >Casting Real-World Shadows
With SketchUp's Shadows feature, you can make your model cast a basic shadow or see how the sun casts shadows on or around...
Read more >Sun Shadow Volume—Help | ArcGIS for Desktop
ArcGIS geoprocessing tool that creates a model of the shadows cast by each input feature using sunlight on a given date and time....
Read more >Common problems and their solutions | Lumion 3D Best ...
Let's start with some of the most common problems that you may face while importing 3D models: Problem: When you import a 3D...
Read more >box-shadow - CSS: Cascading Style Sheets - MDN Web Docs
Interpolation determines intermediate values of properties, such as the blur radius, spread radius, and color, as shadows transition. For each ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome, thank you!
@koxudaxi Take your time! Do the correct approach