fake-usos is a mock implementation of the USOS API based on usos4j
. It lets you simulate a USOS API server locally, making it easier to develop and test your applications without needing access to a real university USOS instance.
Access to the real USOS API is becoming increasingly restricted:
- π Many universities now limit access to employees only.
- π Even for development environments, prior verification is required and involves substantial paperwork.
- π« As a result, it's getting harder to build new apps that rely on USOS data.
fake-usos provides a simple solution - a fake but schema-compliant USOS API that developers can run locally or in CI/CD pipelines.
- π― Simulates USOS API endpoints
- π§© Compatible with
usos4j
and similar clients - π Returns realistic mock data
- βοΈ Automatically stubs out endpoints based on
usos4j
- π Covers only the endpoints implemented in
usos4j
- π§ͺ Works great for local development and automated tests
- π³ Runs easily in Docker
One of the challenges of working with USOS is the lack of an OpenAPI specification or structured API documentation.
To address this, fake-usos infers the supported endpoints directly from usos4j
β a widely-used Java client for USOS.
As usos4j
grows and implements more endpoints, fake-usos automatically creates stubs for them. This ensures API compatibility and saves time maintaining fake responses manually.
π Note: fake-usos only covers endpoints available in
usos4j
. If you're using USOS features not implemented inusos4j
, they won't be available in fake-usos either - by design.
No need for Java, Maven, or Gradle. Just build and run the Docker image:
git clone https://github.com/WMS-DEV/fake-usos.git
cd fake-usos
# Build the Docker image
docker build -t fake-usos .
# Run the container
docker run -p 8080:8080 fake-usos
GET /services/timetable/classgroups
[
{
"type": "classgroup2",
"start_time": "2025-06-22 18:54:28",
"end_time": "2025-06-22 18:54:28",
"name": {
"pl": "272JkSluIu",
"en": "i427EasgGn"
},
"url": "classgroup2"
},
{
"type": "classgroup2",
"start_time": "2025-06-22 18:54:28",
"end_time": "2025-06-22 18:54:28",
"name": {
"pl": "c2Tz3VSqRO",
"en": "RR58iMZ4wU"
},
"url": "classgroup2"
},
{
"type": "classgroup2",
"start_time": "2025-06-22 18:54:28",
"end_time": "2025-06-22 18:54:28",
"name": {
"pl": "dEnGodhxjs",
"en": "VZCjyGSwfP"
},
"url": "classgroup2"
},
{
"type": "classgroup2",
"start_time": "2025-06-22 18:54:28",
"end_time": "2025-06-22 18:54:28",
"name": {
"pl": "lqpOdvsNiA",
"en": "O5ellQgwpP"
},
"url": "classgroup2"
},
{
"type": "classgroup2",
"start_time": "2025-06-22 18:54:28",
"end_time": "2025-06-22 18:54:28",
"name": {
"pl": "onajiK11qc",
"en": "dgi9wsYjHe"
},
"url": "classgroup2"
}
]