foodsoft/swagger/v1/swagger.yaml

57 lines
1.5 KiB
YAML
Raw Normal View History

2022-11-07 12:23:54 +01:00
---
openapi: 3.0.1
info:
title: API V1
version: v1
paths:
"/user":
get:
summary: info about the currently logged-in user
tags:
2022-11-07 17:42:32 +01:00
- User
2022-11-07 12:23:54 +01:00
responses:
'200':
description: success
2022-11-07 17:42:32 +01:00
'401':
description: not logged-in
2022-11-07 13:41:39 +01:00
'403':
description: missing scope
2022-11-07 17:42:32 +01:00
"/user/financial_overview":
get:
summary: financial summary about the currently logged-in user
tags:
- User
- FinancialTransaction
responses:
'200':
description: success
2022-11-07 12:23:54 +01:00
'401':
description: not logged-in
2022-11-07 17:42:32 +01:00
'403':
description: missing scope
2022-11-07 12:23:54 +01:00
components:
securitySchemes:
oauth2:
type: oauth2
flows:
implicit:
authorizationUrl: http://localhost:3000/f/oauth/authorize
scopes:
config:user: reading Foodsoft configuration for regular users
config:read: reading Foodsoft configuration values
config:write: reading and updating Foodsoft configuration values
finance:user: accessing your own financial transactions
finance:read: reading all financial transactions
finance:write: reading and creating financial transactions
user:read: reading your own user profile
user:write: reading and updating your own user profile
offline_access: retain access after user has logged out
servers:
- url: http://{defaultHost}/f/api/v1
variables:
defaultHost:
default: localhost:3000
security:
- oauth2:
- user:read