Create a comment
Changed onAdd a comment to a post to share your thoughts
Request
- Base URLhttp://localhost:8080/api
- URLhttp://localhost:8080/api/posts/{postId}/comments
- Authnone declared
Path parameters
Unique identifier of the post
Request body
Example request
{
"username": "jane_smith",
"content": "Great photo! Where was this taken?"
}Response
Comment created successfully
Example response
{
"id": "987fcdeb-51a2-43d1-9f6b-123456789abc",
"postId": "123e4567-e89b-12d3-a456-426614174000",
"username": "jane_smith",
"content": "Great photo! Where was this taken?",
"createdAt": "2025-06-01T11:15:00Z",
"updatedAt": "2025-06-01T11:15:00Z"
}Changes
- breaking
added the new path request parameter
postId - breaking
the
response property's maxLength was increased from500to1000for the response status - breaking
the
response's property type changed fromobjecttoarrayfor status - breaking
the
response's property type changed fromobjecttoarrayfor status - breaking
the
response's property type changed fromobjecttoarrayfor status - info
the
request property's maxLength was increased from500to1000
- breaking
- breaking
the
request property's minLength was increased from0to1 - breaking
the
request property's minLength was increased from0to1 - breaking
the
response's property type changed fromintegertostring, and format from no format touuidfor status - breaking
the
response's property type changed fromintegertostring, and format from no format touuidfor status - warning
deleted the
pathrequest parameterpostId - warning
the
request property's maxLength was set to500 - warning
the
request property's maxLength was set to50 - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking