2024-02-12-03
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
20b13d8531
commit
0b10f2c980
4 changed files with 5 additions and 437 deletions
|
|
@ -1,431 +0,0 @@
|
||||||
# @Author: GnomeZworc <Nicolas Boufidjeline>
|
|
||||||
# @Date: 2023-04-08 12:16:58
|
|
||||||
# @Last Modified by: GnomeZworc <Nicolas Boufidjeline>
|
|
||||||
# @Last Modified time: 2023-06-05 15:15:04
|
|
||||||
openapi: 3.0.3
|
|
||||||
|
|
||||||
info:
|
|
||||||
title: account gestion
|
|
||||||
version: 1.0.0
|
|
||||||
|
|
||||||
components:
|
|
||||||
securitySchemes:
|
|
||||||
BearerAuth:
|
|
||||||
type: http
|
|
||||||
scheme: bearer
|
|
||||||
|
|
||||||
tags:
|
|
||||||
- name: Accounts
|
|
||||||
- name: Transactions
|
|
||||||
- name: Recurrences
|
|
||||||
- name: Days
|
|
||||||
|
|
||||||
paths:
|
|
||||||
/api/accounts:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Accounts
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Lister tous les comptes
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: page
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
minimum: 1
|
|
||||||
description: Numéro de la page à récupérer
|
|
||||||
- in: query
|
|
||||||
name: limit
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
minimum: 1
|
|
||||||
description: Nombre de comptes à retourner par page
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Liste des comptes récupérée avec succès
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
accounts:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
owner_id:
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
opening_amount:
|
|
||||||
type: number
|
|
||||||
opening_date:
|
|
||||||
type: string
|
|
||||||
'400':
|
|
||||||
description: Données de requête invalides
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Accounts
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Créer un nouveau compte
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
owner_id:
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
opening_amount:
|
|
||||||
type: number
|
|
||||||
opening_date:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
responses:
|
|
||||||
'201':
|
|
||||||
description: Compte créé avec succès
|
|
||||||
'400':
|
|
||||||
description: Données de requête invalides
|
|
||||||
/api/accounts/{id}:
|
|
||||||
put:
|
|
||||||
tags:
|
|
||||||
- Accounts
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Mettre à jour les informations d'un compte
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: ID du compte à mettre à jour
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
validation_date:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Informations du compte mises à jour avec succès
|
|
||||||
'404':
|
|
||||||
description: Compte non trouvé
|
|
||||||
'400':
|
|
||||||
description: Données de requête invalides
|
|
||||||
/api/transactions:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Transactions
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Lister toutes les transactions
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: start_date
|
|
||||||
description: Date de début de la plage de dates
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
- in: query
|
|
||||||
name: end_date
|
|
||||||
description: Date de fin de la plage de dates
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
- in: query
|
|
||||||
name: page
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
minimum: 1
|
|
||||||
description: Numéro de la page à récupérer
|
|
||||||
- in: query
|
|
||||||
name: limit
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
minimum: 1
|
|
||||||
description: Nombre de transactions à retourner par page
|
|
||||||
- in: query
|
|
||||||
name: not_validated_only
|
|
||||||
schema:
|
|
||||||
type: boolean
|
|
||||||
description: Ask if the not validated entry
|
|
||||||
- in: query
|
|
||||||
name: account_id
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
description: Set account id
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Liste des transactions récupérée avec succès
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
transactions:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
account_name:
|
|
||||||
type: string
|
|
||||||
creditor_name:
|
|
||||||
type: string
|
|
||||||
transaction_type_name:
|
|
||||||
type: string
|
|
||||||
date:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
is_positive:
|
|
||||||
type: boolean
|
|
||||||
is_validated:
|
|
||||||
type: boolean
|
|
||||||
currentPage:
|
|
||||||
type: integer
|
|
||||||
totalPages:
|
|
||||||
type: integer
|
|
||||||
'400':
|
|
||||||
description: Données de requête invalides
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Transactions
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Créer une nouvelle transaction
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- account_id
|
|
||||||
- creditor_id
|
|
||||||
- transaction_type_id
|
|
||||||
- date
|
|
||||||
- amount
|
|
||||||
properties:
|
|
||||||
account_id:
|
|
||||||
type: integer
|
|
||||||
creditor_id:
|
|
||||||
type: integer
|
|
||||||
transaction_type_id:
|
|
||||||
type: integer
|
|
||||||
date:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
is_positive:
|
|
||||||
type: boolean
|
|
||||||
is_validated:
|
|
||||||
type: boolean
|
|
||||||
responses:
|
|
||||||
'201':
|
|
||||||
description: Transaction créée avec succès
|
|
||||||
'400':
|
|
||||||
description: Données de requête invalides
|
|
||||||
/api/transactions/{id}:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Transactions
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Récupérer les informations d'une transaction
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: ID de la transaction à récupérer
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Informations de la transaction récupérées avec succès
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
account_id:
|
|
||||||
type: integer
|
|
||||||
creditor_id:
|
|
||||||
type: integer
|
|
||||||
transaction_type_id:
|
|
||||||
type: integer
|
|
||||||
date:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
is_positive:
|
|
||||||
type: boolean
|
|
||||||
is_validated:
|
|
||||||
type: boolean
|
|
||||||
'404':
|
|
||||||
description: Transaction non trouvée
|
|
||||||
/api/recurrences:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Recurrences
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Créer une nouvelle récurrence
|
|
||||||
requestBody:
|
|
||||||
required: true
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- account_id
|
|
||||||
- creditor_id
|
|
||||||
- transaction_type_id
|
|
||||||
- last_appearance_date
|
|
||||||
- frequency
|
|
||||||
- amount
|
|
||||||
properties:
|
|
||||||
account_id:
|
|
||||||
type: integer
|
|
||||||
creditor_id:
|
|
||||||
type: integer
|
|
||||||
transaction_type_id:
|
|
||||||
type: integer
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
is_positive:
|
|
||||||
type: boolean
|
|
||||||
frequency:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- daily
|
|
||||||
- weekly
|
|
||||||
- biweekly
|
|
||||||
- monthly
|
|
||||||
- bimonthly
|
|
||||||
- quarterly
|
|
||||||
- semiannually
|
|
||||||
- annually
|
|
||||||
last_appearance_date:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
appearance_count:
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
'201':
|
|
||||||
description: Récurrence créée avec succès
|
|
||||||
'400':
|
|
||||||
description: Données de requête invalides
|
|
||||||
/api/days/{id}:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Days
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Lister les jours en fonction de la plage de dates
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: ID de la récurrence à supprimer
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
- in: query
|
|
||||||
name: start_date
|
|
||||||
description: Date de début de la plage de dates
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
- in: query
|
|
||||||
name: end_date
|
|
||||||
description: Date de fin de la plage de dates
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
- in: query
|
|
||||||
name: page
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
minimum: 1
|
|
||||||
description: Numéro de la page à récupérer
|
|
||||||
- in: query
|
|
||||||
name: limit
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
minimum: 1
|
|
||||||
description: Nombre de jours à retourner par page
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: Liste des jours récupérée avec succès
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
days:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
account_id:
|
|
||||||
type: integer
|
|
||||||
profit:
|
|
||||||
type: number
|
|
||||||
loss:
|
|
||||||
type: number
|
|
||||||
balance:
|
|
||||||
type: number
|
|
||||||
date:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
currentPage:
|
|
||||||
type: integer
|
|
||||||
totalPages:
|
|
||||||
type: integer
|
|
||||||
'400':
|
|
||||||
description: Données de requête invalides
|
|
||||||
/api/days/calculate/{account_id}:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Days
|
|
||||||
security:
|
|
||||||
- BearerAuth: []
|
|
||||||
summary: Calculer les informations de jour pour un compte donné
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: account_id
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: start_date
|
|
||||||
description: Date de début de la plage de dates
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: date
|
|
||||||
responses:
|
|
||||||
'204':
|
|
||||||
description: Informations de jour calculées avec succès
|
|
||||||
'400':
|
|
||||||
description: error
|
|
||||||
|
|
@ -5,8 +5,8 @@ Documentation de GnomeZworc!
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: Contents:
|
:caption: Contents:
|
||||||
|
|
||||||
doc_api/index
|
|
||||||
personnal/index
|
personnal/index
|
||||||
|
doc_api/index
|
||||||
archive/index
|
archive/index
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ PGP Key
|
||||||
-------
|
-------
|
||||||
|
|
||||||
.. code-block::
|
.. code-block::
|
||||||
:caption: gpg_pubkey.asr
|
:caption: gpg_pubkey.acs
|
||||||
:name: gpg_pubkey.asr
|
:name: gpg_pubkey.acs
|
||||||
|
|
||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
|
@ -47,8 +47,7 @@ PGP Key
|
||||||
8WFqCA==
|
8WFqCA==
|
||||||
=k4mc
|
=k4mc
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
|
:download:`gpg_pubkey.acs </_static/keys/gpg_pubkey.acs>`
|
||||||
file available `a _static/keys/gpg_pubkey.asr`
|
|
||||||
|
|
||||||
|
|
||||||
SSH Key
|
SSH Key
|
||||||
|
|
@ -60,4 +59,4 @@ SSH Key
|
||||||
|
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEL7V6RKvYPtzpk+Kb00e1mXiaqj8gZYIobavWQm1iBQ cardno:14_310_405
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEL7V6RKvYPtzpk+Kb00e1mXiaqj8gZYIobavWQm1iBQ cardno:14_310_405
|
||||||
|
|
||||||
file available `a _static/keys/opensshkey.pub`
|
:download:`opensshkey.pub </_static/keys/opensshkey.pub>`
|
||||||
Loading…
Add table
Add a link
Reference in a new issue