apexdevkit 1.17.2__tar.gz → 1.17.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/PKG-INFO +1 -1
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/schema.py +17 -7
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/pyproject.toml +1 -1
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/LICENSE +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/README.md +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/environment.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/error.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/name.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/request.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/resource.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/router.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fastapi/service.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/fluent.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/formatter.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/http/httpx.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/key_fn.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/base.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/connector.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/database.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/decorator.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/in_memory.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/interface.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/mongo.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/mssql.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/repository/sqlite.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/server.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/synchronization.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/testing/fake.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/testing/rest.py +0 -0
- {apexdevkit-1.17.2 → apexdevkit-1.17.4}/apexdevkit/value.py +0 -0
|
@@ -135,13 +135,7 @@ class Schema:
|
|
|
135
135
|
name: RestfulName
|
|
136
136
|
|
|
137
137
|
def schema_for(self, action: str, fields: dict[str, Any]) -> type[BaseModel]:
|
|
138
|
-
return
|
|
139
|
-
self.name.singular.capitalize() + action,
|
|
140
|
-
**{
|
|
141
|
-
field_name: (field_type, ...)
|
|
142
|
-
for field_name, field_type in fields.items()
|
|
143
|
-
},
|
|
144
|
-
)
|
|
138
|
+
return self._nested_schema_for(self.name.singular.capitalize() + action, fields)
|
|
145
139
|
|
|
146
140
|
def optional_schema_for(
|
|
147
141
|
self, action: str, fields: dict[str, Any]
|
|
@@ -153,3 +147,19 @@ class Schema:
|
|
|
153
147
|
for field_name, field_type in fields.items()
|
|
154
148
|
},
|
|
155
149
|
)
|
|
150
|
+
|
|
151
|
+
def _nested_schema_for(self, name: str, fields: dict[str, Any]) -> type[BaseModel]:
|
|
152
|
+
model_fields = {}
|
|
153
|
+
|
|
154
|
+
for field_name, field_type in fields.items():
|
|
155
|
+
if isinstance(field_type, dict):
|
|
156
|
+
model_fields[field_name] = (
|
|
157
|
+
self._nested_schema_for(
|
|
158
|
+
name.capitalize() + field_name.capitalize(), field_type
|
|
159
|
+
),
|
|
160
|
+
...,
|
|
161
|
+
)
|
|
162
|
+
else:
|
|
163
|
+
model_fields[field_name] = (field_type, ...)
|
|
164
|
+
|
|
165
|
+
return create_model(name, **model_fields)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|