Liferay GPT - Best GPT for liferay

Liferay GPT - Best GPT for liferay · GPT-Aktionen

Liferay Blog API

API for interacting with blog posts on a Liferay-powered site.

  • GET /postsGets a list of blog posts with titles and IDs.
  • GET /posts/{id}Gets the full content of a single post by its ID.
Ursprüngliches API-Schema
{
  "openapi": "3.0.0",
  "info": {
    "title": "Liferay Blog API",
    "description": "API for interacting with blog posts on a Liferay-powered site.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://learnliferay.com/wp-json/wp/v2",
      "description": "Main WordPress REST API server"
    }
  ],
  "paths": {
    "/posts": {
      "get": {
        "operationId": "getBlogPosts",
        "summary": "Gets a list of blog posts with titles and IDs.",
        "parameters": [
          {
            "in": "query",
            "name": "_fields",
            "required": true,
            "description": "Fields to include in the response, separated by commas.",
            "schema": {
              "type": "string",
              "example": "title,id"
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "required": false,
            "description": "Number of posts per page.",
            "schema": {
              "type": "integer",
              "example": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of posts with selected fields.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "title": {
                        "type": "object",
                        "properties": {
                          "rendered": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/posts/{id}": {
      "get": {
        "operationId": "getSinglePost",
        "summary": "Gets the full content of a single post by its ID.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "description": "The ID of the blog post to retrieve.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single post with full content.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "object",
                      "properties": {
                        "rendered": {
                          "type": "string"
                        }
                      }
                    },
                    "content": {
                      "type": "object",
                      "properties": {
                        "rendered": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}