Update a post

PUT /posts/{id}

A complete replacement of a post with id.

Path parameters

  • id string Required

    The postId requested by user.

Body Required

  • id string Required

    The post id.

  • userId string Required

    The post userId.

  • title string Required

    The title of the post

  • body string Required

    The body content of the post

Responses

  • 200

    Updated the post completely.

PUT /posts/{id}
curl \
 -X PUT https://api.example.com/v1/posts/{id} \
 -H "Content-Type: application/json" \
 -d '{"userId":1,"id":1,"title":"The First Post","body":"we are building a blog post API using OpenAPI Specification."}'
Request example
{
  "userId": 1,
  "id": 1,
  "title": "The First Post",
  "body": "we are building a blog post API using OpenAPI Specification."
}
Request examples
{
  "id": 1,
  "body": "we are building a blog post API using OpenAPI Specification.",
  "title": "The First Post",
  "userId": 1
}