Skip to content

Commit

Permalink
made sure that the linking is working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Dec 25, 2024
1 parent 3d28303 commit a98b44a
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 1,305 deletions.
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ repos:
args:
- --fix=lf
- id: requirements-txt-fixer
# only api
- repo: local
hooks:
- id: openapi-format
name: openapi-format
entry: openapi-format ./data/output/openapi.yaml --output
language: system
files: "data/output/openapi.yaml"
# only server
- repo: local
hooks:
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ Please note we have a [Code of Conduct](CODE_OF_CONDUCT.md), please follow it in
build.
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Update openapi.yaml with any breaking API-changes
4. You may merge the Pull Request in once you have the sign-off of one other developer, or if you
3. You may merge the Pull Request in once you have the sign-off of one other developer, or if you
do not have permission to do that, you may request the reviewer to merge it for you.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ You can consume our API Documentation in two ways:

- Head over to [our Website](https://nav.tum.de/api) and look at the interactive documentation
- We also describe our API in an [OpenAPI 3.0](https://de.wikipedia.org/wiki/OpenAPI) compliant file.
You can find it [here](openapi.yaml).
You can find it [here](https://nav.tum.de/api/openapi.json).
Using this Specification you can generate your own client to access the API in the language of your choice.
To do this head over to
the [Swagger Editor](https://editor.swagger.io/?url=https://raw.githubusercontent.com/TUM-Dev/navigatum/main/openapi.yaml)
the [Swagger Editor](https://editor.swagger.io/?url=https://nav.tum.de/api/openapi.json)
or other similar [OpenAPI tools](https://openapi.tools/).

> [!NOTE]
Expand Down
1 change: 0 additions & 1 deletion data/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ COPY translations.yaml translations.yaml
COPY output output

RUN python3 compile.py \
&& test -f "./output/openapi.yaml" \
&& test -f "./output/status_data.json" \
&& test -f "./output/status_data.parquet" \
&& test -f "./output/search_data.json" \
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ services:
- "traefik.enable=true"
- "traefik.http.routers.navigatum-server.entrypoints=webs"
- "traefik.http.routers.navigatum-server.tls.certresolver=leacme"
- "traefik.http.routers.navigatum-server.rule=Host(`nav.tum.de`) && (PathPrefix(`/api/locations/`) || PathPrefix(`/api/get/`) || PathPrefix(`/api/preview/`) || Path(`/api/search`) || PathPrefix(`/api/feedback/`) || Path(`/api/calendar`) || Path(`/api/status`)|| Path(`/api/metrics`) || PathPrefix(`/api/maps/indoor`))"
- "traefik.http.routers.navigatum-server.rule=Host(`nav.tum.de`) && Path(`/api`)"
- "traefik.http.services.navigatum-server.loadbalancer.server.port=3003"
networks:
- traefik_traefik
Expand Down
4 changes: 2 additions & 2 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ If you have made changes to the API, you need to update the API documentation.

There are two editors for the API documentation (both are imperfect):

- [Swagger Editor](https://editor.swagger.io/?url=https://raw.githubusercontent.com/TUM-Dev/navigatum/main/openapi.yaml)
- [Swagger Editor](https://editor.swagger.io/?url=https://nav.tum.de/api/openapi.json)
- [stoplight](https://stoplight.io/)

#### Testing
Expand All @@ -113,7 +113,7 @@ To do so, run the following commands against the API Server:
python -m venv venv
source venv/bin/activate
pip install schemathesis
st run --workers=auto --base-url=http://localhost:3003 --checks=all ../openapi.yaml
st run --workers=auto --base-url=http://localhost:3003 --checks=all https://nav.tum.de/api/openapi.json
```

Some fuzzing-goals may not be available for you locally, as they require prefix-routing (f.ex.`/cdn` to the CDN) and
Expand Down
2 changes: 1 addition & 1 deletion webclient/app/components/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const navigation = computed(() => [
},
{
name: t("api.text"),
href: "/api",
href: "https://nav.tum.de/api",
},
{
name: t("about.text"),
Expand Down
34 changes: 0 additions & 34 deletions webclient/app/components/SwaggerUI.vue

This file was deleted.

9 changes: 0 additions & 9 deletions webclient/app/pages/api.vue

This file was deleted.

3 changes: 0 additions & 3 deletions webclient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
"nightwind": "1.1.13",
"nuxt": "3.13.0",
"sharp": "0.33.5",
"swagger-ui": "5.18.2",
"swaggerdark": "github:octycs/SwaggerDark#f02d394c8ff698cdd93e09c2188b058d2d686ca3",
"vue": "3.5.13",
"vue-router": "4.5.0",
"vue3-carousel": "0.10.0"
Expand All @@ -43,7 +41,6 @@
"@nuxtjs/tailwindcss": "6.12.2",
"@types/geojson": "7946.0.15",
"@types/nightwind": "1.0.0",
"@types/swagger-ui": "3.52.4",
"@vue/tsconfig": "0.7.0",
"autoprefixer": "10.4.20",
"eslint": "9.17.0",
Expand Down
Loading

0 comments on commit a98b44a

Please sign in to comment.