Skip to content

Commit 5d5a0c6

Browse files
authored
Merge pull request #3 from mts-ai/feature/fix-output-type
id should be string
2 parents 444a86e + 9368829 commit 5d5a0c6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

fastapi_rest_jsonapi/exceptions/json_api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ def __init__(
5151
@property
5252
def _dict(self):
5353

54-
return {"status_code": self.status_code, "source": self.source, "tittle": self.title, "detail": self._detail}
54+
return {
55+
"status_code": self.status_code,
56+
"source": self.source,
57+
"title": self.title,
58+
"detail": self._detail,
59+
}
5560

5661

5762
class UnsupportedFeatureORM(HTTPException):

fastapi_rest_jsonapi/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class BasePostJSONAPISchema(BaseJSONAPIItemSchema):
3434
class BaseJSONAPIObjectSchema(BaseJSONAPIItemSchema):
3535
"""Base JSON:API object schema."""
3636

37-
id: Union[int, uuid.UUID, str] = Field(description="ID объекта")
37+
id: str = Field(description="ID объекта")
3838

3939

4040
class BasePatchJSONAPISchema(BaseJSONAPIObjectSchema):

0 commit comments

Comments
 (0)