refactor: Update example generation and schema handling

- Remove unused `generate_example_call` and `generate_example_response` functions
- Rename `example_call` to `example_request` in `DocMethod`
- Update schema example extraction to use `schema.example` directly
- Introduce `generate_request_example` and `generate_response_example` for dynamic example generation
- Change type of `id` from string to number in schema examples

PS: The work is still in progress
This commit is contained in:
Mahmoud-Emad
2025-09-22 14:58:22 +03:00
parent bb0b9d2ad9
commit ba48ae255b
8 changed files with 150 additions and 195 deletions

View File

@@ -37,8 +37,8 @@
"description": "The unique identifier of the comment to retrieve.",
"required": true,
"schema": {
"type": "string",
"example": "comment_12345"
"type": "number",
"example": "1"
}
},
{
@@ -57,7 +57,7 @@
"schema": {
"type": "object",
"example": {
"id": "comment_12345",
"id": 1,
"text": "This is a sample comment",
"created_at": "2024-01-15T10:30:00Z"
}