Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
I
Inventory System Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
LibreFoodPantry
Client Solutions
Theas Pantry
InventorySystem Category-Based
Inventory System Backend
Commits
800faa60
Commit
800faa60
authored
1 month ago
by
Alex Moulton
Browse files
Options
Downloads
Patches
Plain Diff
chore:Created BackendAPI schemas
parent
b183f9fa
No related branches found
No related tags found
No related merge requests found
Pipeline
#1694757440
failed
1 month ago
Stage: build
Stage: lint
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
specification/backendapi.yaml
+229
-0
229 additions, 0 deletions
specification/backendapi.yaml
with
229 additions
and
0 deletions
specification/backendapi.yaml
0 → 100644
+
229
−
0
View file @
800faa60
---
openapi
:
3.0.3
servers
:
-
url
:
'
http/localhost'
info
:
title
:
InventoryBackend
version
:
0.1.0
description
:
Category-Based Inventory information for Thea's Pantry.
contact
:
name
:
Thea's Pantry
email
:
info@librefoodpantry.org
url
:
librefoodpantry.org
tags
:
-
name
:
inventory
description
:
Category Based Inventory to Thea's Pantry
-
name
:
version
description
:
API version
paths
:
/inventory
:
get
:
description
:
Gets an array of the categories in the inventory
tags
:
-
inventory
operationId
:
getInventory
responses
:
'
200'
:
description
:
OK
content
:
application.json
:
schema
:
$ref
:
'
#/components/schemas/Inventory'
'
401'
:
$ref
:
'
#/components/responses/Unauthorized'
'
500'
:
$ref
:
'
#/components/responses/ServerError'
post
:
description
:
Creates a category
tags
:
-
inventory
operationId
:
createCategory
x-eov-operation-handler
:
endpoints
requestBody
:
content
:
application/json
:
example
:
id
:
I001
name
:
Beverages
stock
:
120
schema
:
$ref
:
'
#/components/schemas/Category'
responses
:
'
201'
:
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/Category'
description
:
Created
'
400'
:
$ref
:
'
#/components/responses/BadRequest'
'
409'
:
$ref
:
'
#/components/responses/Conflict'
'
500'
:
$ref
:
'
#/components/responses/ServerError'
'
/inventory/{categoryName}'
:
description
:
Specific category in inventory
parameters
:
-
name
:
categoryName
in
:
path
required
:
true
description
:
Name of the category
schema
:
$ref
:
'
#/components/schemas/CategoryName'
put
:
description
:
Updates a Category
tags
:
-
inventory
operationId
:
updateCategory
x-eov-operation-handler
:
requestBody
:
content
:
application/json
:
example
:
id
:
I001
name
:
Beverages
stock
:
120
schema
:
$ref
:
'
#/components/schemas/Category'
responses
:
'
201'
:
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/Category'
description
:
Created
'
400'
:
$ref
:
'
#/components/responses/BadRequest'
'
500'
:
$ref
:
'
#/components/responses/ServerError'
get
:
description
:
Gets the category in the inventory
tags
:
-
inventory
operationId
:
getCategory
responses
:
'
200'
:
description
:
OK
content
:
application.json
:
schema
:
$ref
:
'
#/components/schemas/Category'
'
401'
:
$ref
:
'
#/components/responses/Unauthorized'
'
500'
:
$ref
:
'
#/components/responses/ServerError'
delete
:
description
:
Deletes a category
tags
:
-
inventory
operationId
:
deleteCategory
responses
:
'
200'
:
description
:
OK
'
400'
:
$ref
:
'
#/components/responses/BadRequest'
'
401'
:
$ref
:
'
#/components/responses/Unauthorized'
'
404'
:
$ref
:
'
#/components/responses/NotFound'
'
500'
:
$ref
:
'
#/components/responses/ServerError'
/version
:
get
:
description
:
Get current API version number
tags
:
-
inventory
operationId
:
getAPIVersion
x-eov-operation-handler
:
endpoints
responses
:
'
200'
:
description
:
OK
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/APIVersion'
'
500'
:
$ref
:
'
#/components/responses/ServerError'
components
:
responses
:
Conflict
:
description
:
Object already exists
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/EovError'
Unauthorized
:
description
:
No valid token was found
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/EovError'
BadRequest
:
description
:
Request was malformed
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/EovError'
ServerError
:
description
:
There was an error in the servers
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/EovError'
NotFound
:
description
:
The specified resource was not found
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/EovError'
schemas
:
EovError
:
description
:
Not Acceptable
type
:
object
example
:
message
:
'
.response
should
have
required
property'
'
name'
'
,
.response
should
have
required
property
'
'
id'
'
'
errors
:
-
path
:
.response.name
message
:
should have required property 'name'
errorCode
:
required.openapi.validation
-
path
:
.response.id
message
:
should have required property 'id'
errorCode
:
required.openapi.validation
CategoryId
:
description
:
Database's Id for the category
type
:
string
CategoryName
:
description
:
Name of the category
type
:
string
CategoryStock
:
description
:
COunt of the stock of the category
type
:
integer
Category
:
example
:
id
:
I001
name
:
Beverages
stock
:
5
properties
:
id
:
$ref
:
'
#/components/schemas/CategoryId'
name
:
$ref
:
'
#/components/schemas/CategoryName'
stock
:
$ref
:
'
#/components/schemas/CategoryStock'
required
:
-
id
-
name
-
stock
Inventory
:
description
:
Collection of the categories
type
:
array
nullable
:
false
items
:
$ref
:
'
#/components/schemas/Category'
APIVersion
:
example
:
1.2.3
description
:
Current operating version of the API
# yamllint disable-line rule:line-length
pattern
:
^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
type
:
string
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment