AngelPrz8a / Symfony_API

Identify how create APIs in Symfony, creating and reading post and only reading categories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo

Symfony also is useful with API

Identify how create APIs in Symfony, creating and reading post and only reading categories

Tech Stack

Server: Symfony 6, API Platform

Installation

  1. Clone this repository.
  2. Navegate to the project directory
  3. Run composer install to install the dependencies.
  4. Configure your environment variables.

API Reference

Category

Type Path Description Params
GET /api/categories All categories
{
  "id": 0,
  "name": "string",
  "posts": [
    "string"
  ]
}
Type Path Description Params
GET /api/categories/{id} An specific category id
{
  "id": 0,
  "name": "string",
  "posts": [
    "string"
  ]
}

Post

Type Path Description Params
GET /api/posts All posts
{
    "id": 0,
    "title": "string",
    "category": {
      "id": 0,
      "name": "string"
    },
    "summary": "string"
  }
Type Path Description Params
GET /api/posts/{id} An specific post id
{
  "id": 0,
  "title": "string",
  "body": "string",
  "category": {
    "id": 0,
    "name": "string"
  }
}
Type Path Description Params
POST /api/posts Create a post title, body, category
{
  "id": 0,
  "title": "string",
  "body": "string",
  "category": "string",
  "summary": "string"
}
Type Path Description Params
PATCH /api/posts/{id} Update a post id, title, body, category
{
  "id": 0,
  "title": "string",
  "body": "string",
  "category": "string",
  "summary": "string"
}

Links

portfolio linkedin

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

Identify how create APIs in Symfony, creating and reading post and only reading categories

License:MIT License


Languages

Language:PHP 97.0%Language:Twig 3.0%