2024-02-11

This commit is contained in:
ddidier/sphinx-doc 2023-10-14 21:06:27 +00:00 committed by Nicolas Boufidjeline
commit d654ae6731
29 changed files with 5392 additions and 0 deletions

431
source/_static/api.yml Normal file
View file

@ -0,0 +1,431 @@
# @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

File diff suppressed because one or more lines are too long

89
source/_static/handsontable.full.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
{% extends "!layout.html" %}
{%- block extrahead %}
<link rel="stylesheet" type="text/css" href="{{ pathto('_static/handsontable.full.min.css', 1) }}">
<script src="{{ pathto('_static/handsontable.full.min.js', 1) }}"></script>
{% endblock %}

113
source/conf.py Normal file
View file

@ -0,0 +1,113 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'GnomeZworc doc\'s'
copyright = '2023, Nicolas Boufidjeline'
author = 'Nicolas Boufidjeline'
# -- General configuration ---------------------------------------------------
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'fr'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# == NDD DOCKER SPHINX - OVERRIDE ============================================
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'recommonmark',
'sphinx.ext.graphviz',
'sphinx.ext.ifconfig',
# 'sphinx.ext.imgmath',
'sphinx.ext.mathjax',
'sphinx.ext.todo',
'sphinx_copybutton',
'sphinx-prompt',
'sphinxemoji.sphinxemoji',
'sphinxcontrib.actdiag',
'sphinxcontrib.blockdiag',
'sphinxcontrib.excel_table',
'sphinxcontrib.git_context',
'sphinxcontrib.mermaid',
'sphinxcontrib.nwdiag',
'sphinxcontrib.packetdiag',
'sphinxcontrib.plantuml',
'sphinxcontrib.rackdiag',
'sphinxcontrib.seqdiag',
]
# If true, 'todo' and 'todoList' produce output, else they produce nothing.
todo_include_todos = True
# -- HTML --------------------------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# Must be defined somewhere
html_context = {}
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = '_static/logo.png'
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = '_static/favicon.ico'
# If true, links to the reST sources are added to the pages.
#
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
html_show_sphinx = False

7
source/doc_api/index.rst Normal file
View file

@ -0,0 +1,7 @@
Doc Api
=======
.. toctree::
:titlesonly:
Cecie est un test

44
source/index.rst Normal file
View file

@ -0,0 +1,44 @@
Documentation de GnomeZworc!
============================
.. toctree::
:maxdepth: 2
:caption: Contents:
doc_api/index
.. mermaid::
sequenceDiagram
participant Client
participant Admin
participant TRCP
participant Zammad
Admin->>TRCP: Add stock
loop Commandes
Client->>TRCP: Create commandes
TRCP->>Admin: notifie nouvelle commande
end
Note right of TRCP: boucle de commande
Admin->>TRCP: List commandes
Admin->>TRCP: validate one command
TRCP->>Zammad: Create ticket in zammad
Zammad->>TRCP: give ticket id
Zammad->>Client: send validation mail
loop exchange
Client-->>Zammad: ask
Zammad-->>Client: ask
end
loop status
Client->>TRCP: ask status
TRCP->>Zammad: get status
Zammad->>TRCP: send back status
TRCP->>Client: respond intel
end
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`