Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions Chapter03/budgeting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
openapi: 3.0.1
info:
title: Budgeting API
description: Manages budget line items
version: '1.0'
servers:
- url: http://localhost:5000/budgeting/api

paths:
/items:
get:
description: Get the list budget line items
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/items'
post:
description: Create a new budget line item
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/item'
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/item'
/item/{itemId}:
get:
description: Gets the information for the specified line item
parameters:
- in: path
schema:
$ref: '#/components/schemas/itemId'
name: itemId
description: Id of the line item
required: true
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/item'
put:
description: Updates the information for the specified line item
parameters:
- in: path
schema:
$ref: '#/components/schemas/itemId'
example:
title: Example Task itemId
value: 1
name: itemId
description: Id of the line item
required: true
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/item'
examples:
Groceries:
value:
transaction_date: 2024-06-01
amount: 123.45
category: groceries
Rent:
value:
transaction_date: 2024-06-01
amount: 1500
category: rent
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/item'
delete:
description: Removes the specified line item
parameters:
- in: path
schema:
$ref: '#/components/schemas/itemId'
name: itemId
description: Id of the line item
required: true
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
type: object
components:
schemas:
item:
type: object
required:
- transaction_date
- amount
- category
properties:
transaction_date:
type: string
format: date
amount:
type: integer
category:
type: string
itemId:
type: integer
minimum: 1
items:
type: array
items:
$ref: '#/components/schemas/item'
121 changes: 121 additions & 0 deletions Chapter03/todo_list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
openapi: 3.0.1
info:
title: ToDo List API
description: Manages ToDo list tasks
version: '1.0'
servers:
- url: http://localhost:5000

paths:
/tasks:
get:
description: Get the list of all tasks
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/tasks'
post:
description: Create a new task
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/task'
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/task'
/tasks/{taskId}:
get:
description: Gets the information for the specified task
parameters:
- in: path
schema:
$ref: '#/components/schemas/taskId'
name: taskId
description: Id of the task
required: true
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/task'
put:
description: Updates the information for the specified task
parameters:
- in: path
schema:
$ref: '#/components/schemas/taskId'
example:
title: Example Task taskId
value: 1
name: taskId
description: Id of the task
required: true
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/task'
examples:
New:
value:
title: Start Learning API Testing
status: New
In Progress:
value:
title: Keeep learning API Testing
status: In Progress
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/task'
delete:
description: Updates the information for the specified task
parameters:
- in: path
schema:
$ref: '#/components/schemas/taskId'
name: taskId
description: Id of the task
required: true
responses:
'200':
description: Succussful Operation
content:
application/json:
schema:
type: object
components:
schemas:
task:
type: object
required:
- title
- status
properties:
title:
type: string
status:
type: string
enum: [New,In Progress,Completed]
taskId:
type: integer
minimum: 1
tasks:
type: array
items:
$ref: '#/components/schemas/task'
56 changes: 0 additions & 56 deletions Chapter06/Star Wars API_Chapter6_initial.postman_collection.json

This file was deleted.

Loading