Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
leximpact-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur dotations aux communes
leximpact-server
Commits
672f1694
Commit
672f1694
authored
Jun 16, 2020
by
sandcha
Browse files
Options
Downloads
Patches
Plain Diff
Add dotations endpoint to spec
parent
a6fc939e
No related branches found
No related tags found
1 merge request
!19
Ajoute un endpoint /dotations
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
server/api.yaml
+18
-0
18 additions, 0 deletions
server/api.yaml
server/handlers/__init__.py
+1
-0
1 addition, 0 deletions
server/handlers/__init__.py
server/handlers/dotations.py
+1
-1
1 addition, 1 deletion
server/handlers/dotations.py
with
20 additions
and
1 deletion
server/api.yaml
+
18
−
0
View file @
672f1694
...
...
@@ -79,6 +79,19 @@ paths:
description
:
L'usager a pu étre authentifié·e
'
401'
:
description
:
L'usager n'est pas dans la liste validée par l'INSEE
/dotations
:
post
:
summary
:
Demande le calcul de l'impact des articles de loi sur les dotations aux collectivités.
operationId
:
server.handlers.Dotations.simule_dotations
requestBody
:
required
:
true
content
:
application/json
:
schema
:
$ref
:
'
#/components/schemas/dotations'
responses
:
'
201'
:
description
:
Résultat de la simulation des dotations aux collectivités.
components
:
schemas
:
Greetings
:
...
...
@@ -256,3 +269,8 @@ components:
properties
:
email
:
type
:
string
dotations
:
type
:
object
properties
:
dotations
:
type
:
object
This diff is collapsed.
Click to expand it.
server/handlers/__init__.py
+
1
−
0
View file @
672f1694
from
.cas_types
import
CasTypes
,
SimulationRunner
# noqa
from
.welcome
import
Welcome
# noqa
from
.dotations
import
Dotations
This diff is collapsed.
Click to expand it.
server/handlers/dotations.py
+
1
−
1
View file @
672f1694
class
Dotations
(
object
):
def
home
(
**
params
:
dict
)
->
tuple
:
def
simule_dotations
(
**
params
:
dict
)
->
tuple
:
request_body
=
params
[
"
body
"
]
# vérifier le format
...
...
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