Open hugo-cordoba opened 1 month ago
The TaskManager
component is a standalone Angular component designed to manage a list of tasks. It includes functionality to add, display, and mark tasks as done. The component interacts with a backend REST API to fetch, create, update, and delete tasks.
Model: task.model.ts
id
, name
, description
, and done
.Service: task.service.ts
Component Logic: taskmanager.component.ts
Component HTML: taskmanager.component.html
Component CSS: taskmanager.component.css
openapi: 3.0.0
info:
title: TaskManager API
version: 1.0.0
paths:
/tasks:
get:
summary: Get all tasks
responses:
'200':
description: A list of tasks
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Task'
post:
summary: Add a new task
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
responses:
'201':
description: Task created
/tasks/{id}:
put:
summary: Update an existing task
parameters:
- in: path
name: id
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
responses:
'200':
description: Task updated
delete:
summary: Delete a task
parameters:
- in: path
name: id
required: true
schema:
type: string
responses:
'204':
description: Task deleted
components:
schemas:
Task:
type: object
properties:
id:
type: string
name:
type: string
description:
type: string
done:
type: boolean
This specification describes the necessary API endpoints for the TaskManager component to interact with the backend.