This API provides data from the Open Data Hub in the standard formats NeTEx (Italian Profile) and SIRI-LITE FM (JSON).
It acts as a wrapper of the Open Data Hub API and has no internal data storage.
Clone the repository and cd into it
We suggest using docker compose up
to build and test.
The docker image provides live code reloading
To run natively
cd src
go run .
Refer to the docker file and docker-compose for more details
The application is written in Go with
For documentation on the procotols, see the initial issue
The documents linked there are also in the documentation directory
The subrepo netex-italian-profile tracks the Italian netex profile repo and contains examples and validation xsd files.
Analogously, the subrepo siri-italian-profile tracks the Italian siri profile repo
The Italian profiles are an extension of the base NeTEx/SIRI specifications by CEN
Example calls such as the ones used by this API are provided in calls.http
New data sources are implemented as providers, implementing one or more of the relevant interfaces (see other provider). The provider must then be added to the endpoint calls in src/main.go
Native: From /src
folder run go test ./...
Docker: docker compose up test
The validation directory has a script to validate the produced XML files against the Italian Profile xsd.
xmllint is needed to run it locally, but we have also set up a dockerized version.
docker compose --profile validate up --attach validate --abort-on-container-exit
This starts a local API, requests the XML files, adds the missing header parts, and validates them
The XML file that was validated is saved in ./validation/validate.xml
Find here guidelines for developers.
For support, please contact [email protected].
If you'd like to contribute, please follow our Getting Started instructions.
More documentation can be found at https://opendatahub.readthedocs.io/en/latest/index.html.
The code in this project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 license.
For detailed licensing information, please refer to the REUSE spec.
This project is REUSE compliant, more information about the usage of REUSE in NOI Techpark repositories can be found here.
Since the CI for this project checks for REUSE compliance you might find it useful to use a pre-commit hook checking for REUSE compliance locally. The pre-commit-config file in the repository root is already configured to check for REUSE compliance with help of the pre-commit tool.
Install the tool by running:
pip install pre-commit
Then install the pre-commit hook via the config file by running:
pre-commit install