https://github.com/angelprz8a/symfony_api
Identify how create APIs in Symfony, creating and reading post and only reading categories
https://github.com/angelprz8a/symfony_api
api symfony6
Last synced: 4 months ago
JSON representation
Identify how create APIs in Symfony, creating and reading post and only reading categories
- Host: GitHub
- URL: https://github.com/angelprz8a/symfony_api
- Owner: AngelPrz8a
- License: mit
- Created: 2023-12-07T00:09:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-07T00:49:27.000Z (over 1 year ago)
- Last Synced: 2025-01-03T22:49:44.897Z (6 months ago)
- Topics: api, symfony6
- Language: PHP
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## 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](https://symfony.com/), [API Platform](https://api-platform.com/)## 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|```json
{
"id": 0,
"name": "string",
"posts": [
"string"
]
}
```| Type | Path |Description| Params
|:-|:-|:-|:-
| `GET` | `/api/categories/{id}`|An specific category|id
```json
{
"id": 0,
"name": "string",
"posts": [
"string"
]
}
```
##
### Post
| Type | Path |Description| Params
|:-|:-|:-|:-
| `GET` | `/api/posts`|All posts|
```json
{
"id": 0,
"title": "string",
"category": {
"id": 0,
"name": "string"
},
"summary": "string"
}
```| Type | Path |Description| Params
|:-|:-|:-|:-|
| `GET` | `/api/posts/{id}`|An specific post| id
```json
{
"id": 0,
"title": "string",
"body": "string",
"category": {
"id": 0,
"name": "string"
}
}
```| Type | Path |Description| Params
|:-|:-|:-|:-
| `POST` | `/api/posts`|Create a post| title, body, category
```json
{
"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
```json
{
"id": 0,
"title": "string",
"body": "string",
"category": "string",
"summary": "string"
}
```## Links
[](https://angelprz8a.github.io/Portafolio/)
[](https://www.linkedin.com/in/angelprz8a/)## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).