Add a router
Adding a router
To add a router there are two steps:
- Create a module in
diracx.routers
for the given service. - Add an entry to the
diracx.services
entrypoint. - Do not forget the Access Policy (see chapter lower down)
We'll now make a /parking/
router which contains information store in the DummyDB
.
Creating the router submodule
TODO: This isn't yet documented here however see diracx.routers.auth.well_known
for an example.
Defining the new router in the diracx.services
entrypoint
Modify the package's setup.cfg
This will prefix the routes with /parking/
and mark them with the "parking"
tag in the OpenAPI spec.
[!WARNING] Any modification in the
setup.cfg
requires to re-install installdiracx
, even if it is a developer installation (pip install -e
)