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:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user