Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a39d066
feat: Update userdb to match api v2.1
stark-cybertech Jun 29, 2025
828f0ad
feat: add bio field
stark-cybertech Jun 29, 2025
11252d3
feat: update user entity object to match api v2.1
stark-cybertech Jun 29, 2025
702dd30
cleanup: remove obsolete classes
stark-cybertech Jun 29, 2025
d2a3845
refactor: rename database entity classes to differentiate themselves …
stark-cybertech Jun 29, 2025
bc85ac2
feat: implemented basic logic for UserService
stark-cybertech Jun 29, 2025
874b18b
feat: initial implementation of UserController class
stark-cybertech Jun 29, 2025
ed661e9
spec: update api spec to v2.1.1
stark-cybertech Jun 29, 2025
f5d1086
gen: generate code and documentation based on latest version of opena…
github-actions[bot] Jun 29, 2025
785606c
feat: update UserController to api v2.1.1
stark-cybertech Jun 29, 2025
2e661df
workflow: trigger on all changes to api/*
stark-cybertech Jun 30, 2025
1eed913
gen: generate code and documentation based on latest version of opena…
github-actions[bot] Jun 30, 2025
6c354a9
Merge branch 'main' into feature/user-service
stark-cybertech Jun 30, 2025
6072057
fix: remove extra comma
stark-cybertech Jul 1, 2025
2b65c51
feat: add framework for testing userservice
stark-cybertech Jul 1, 2025
2728bb1
feat: add unit-tests for userService
stark-cybertech Jul 1, 2025
7534b33
feat: add dynamic test container to application test
stark-cybertech Jul 1, 2025
40a2019
feat: add testing to github actions
stark-cybertech Jul 1, 2025
2d86d53
fix: update version of upload artifacts action
stark-cybertech Jul 1, 2025
5f90b51
fix: incorrect reporter type
stark-cybertech Jul 1, 2025
f0c451f
fix: correct gradle path
stark-cybertech Jul 1, 2025
4d70c0b
fix: updated gitignore to no longer ignore gradle
stark-cybertech Jul 1, 2025
d92cb7a
fix: remove illegal special characters
stark-cybertech Jul 1, 2025
0698d50
tests: set tests to run before build
stark-cybertech Jul 2, 2025
a034ba5
test: implement test cases for rejecting email
stark-cybertech Jul 2, 2025
1d793fb
fix: Add better exception handling and input validation to userService
stark-cybertech Jul 2, 2025
265c76b
docs: Add badge to readme.md
stark-cybertech Jul 2, 2025
af13d28
Feature/user service tests (#62)
stark-cybertech Jul 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/build_application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ on:

jobs:

# Run tests (unimplemented)
# test:
# name: Run Tests
# uses: ./.github/workflows/test_application.yml
# Run tests
test:
name: Run Tests
uses: ./.github/workflows/java_tests.yml

# Call the docker_build workflow to build and publish images
build:
name: Build & Publish Images
uses: ./.github/workflows/docker_build.yml
uses: ./.github/workflows/docker_build.yml
needs: test
57 changes: 57 additions & 0 deletions .github/workflows/java_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow should build docker images every time code is pushed to the repository
name: Test Java Applications

# This workflow is triggered only when called by another workflow
on:
workflow_call:

jobs:

test:
name: Run tests on java applications
runs-on: ubuntu-latest

# Use a matrix strategy to run the tests for all applications
strategy:
matrix:
# Add any future services relative paths from . here
service: [user]

steps:

- name: Check out repository
uses: actions/checkout@v3

- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Make Gradle wrapper executable
run: chmod +x gradlew
working-directory: server/${{ matrix.service }}

- name: Run tests
run: ./gradlew test --info
working-directory: server/${{ matrix.service }}

# Upload the junit reports as artifacts
- name: Upload JUnit test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: junit-test-results
path: |
server/${{ matrix.service }}/build/test-results
server/${{ matrix.service }}/build/reports/tests

# Add annotations to checks tab
- name: Report Tests
if: always()
uses: dorny/test-reporter@v2
with:
name: ${{ matrix.service }}
path: ./server/${{ matrix.service }}/build/test-results/**/*.xml
reporter: java-junit
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/update_api_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
push:
paths:
- 'api/openapi.yaml'
- 'api/*'

jobs:

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ sketch
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Meet@Mensa logo](resources/img/[email protected] "Meet@Mensa")

[![Build & Test Meet@Mensa](https://github.com/AET-DevOps25/team-devoops/actions/workflows/build_application.yml/badge.svg)](https://github.com/AET-DevOps25/team-devoops/actions/workflows/build_application.yml)

Many students at TUM, particularly in the larger study programs, report feeling lonely and isolated despite having countless peers. One of the places where this is especially noticeable is the Mensa during lunchtime. It's common for students that don't have a strong network of friends at university to eat alone or avoid eating at the Mensa entirely to not feel socially awkward.

Our tool - *Meet@Mensa* - focuses on transforming the potentially uncomfortable situation of eating alone at the Mensa into an opportunity to meet fellow students and make new friends. In order to enable this, our tool offers the following features:
Expand Down
24 changes: 24 additions & 0 deletions api/changelogs/changelog_v2_1_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Info
### Version
v2.1
### Date
2025-06-27
### Autor
James Stark
## Changelog:

### Paths
- Add 500 responses to all endpoints
- Change 201 response to 200 for register user

``` diff

@@ All @@
+ insert code 500 response
# Formally handle errors

@@ /api/v2/user/registr POST @@
- remove code 201 response
+ insert code 200 response

```
30 changes: 27 additions & 3 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ x-stoplight:
id: ceylawji1yc2t
info:
title: MeetAtMensa
version: 1.0.0
version: 2.1.1
description: |-
This OpenAPI specification defines the endpoints, schemas, and security mechanisms
for the Meet@Mensa User micro-service.
Expand Down Expand Up @@ -701,6 +701,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal Server Error
operationId: get-api-v2-user-userID
x-stoplight:
id: p1d67jb8y16q8
Expand All @@ -724,6 +726,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
5XX:
description: Server Error
operationId: put-api-v2-user-userID
x-stoplight:
id: exmvsbw8301bi
Expand All @@ -746,6 +750,8 @@ paths:
$ref: '#/components/responses/BadRequestError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal Server Error
operationId: delete-api-v2-user-userID
x-stoplight:
id: 407z5o4zq5tvl
Expand All @@ -757,8 +763,8 @@ paths:
tags:
- User
responses:
'201':
description: Successfully created user
'200':
description: OK
content:
application/json:
schema:
Expand All @@ -769,6 +775,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'409':
description: Conflict
'500':
description: Internal Server Error
operationId: post-api-v2-user-register
x-stoplight:
id: laufntfpxgg42
Expand All @@ -792,6 +800,8 @@ paths:
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'500':
description: Internal Server Error
operationId: post-api-v2-matching-request
x-stoplight:
id: 1x5ta8qguutzq
Expand Down Expand Up @@ -823,6 +833,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal Server Error
operationId: get-api-v2-matching-matches-userID
description: 'Retrieve all matches for a user with {user-id} from the matching-service'
'/api/v2/matching/requests/{user-id}':
Expand All @@ -845,6 +857,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal Server Error
operationId: get-api-v2-matching-requests-userID
x-stoplight:
id: wkc1ys6vkbv12
Expand All @@ -865,6 +879,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal Server Error
operationId: delete-api-v2-matching-matches-request-id
x-stoplight:
id: shgx14ydoaa2f
Expand All @@ -888,6 +904,8 @@ paths:
$ref: '#/components/responses/NotFoundError'
'406':
description: MatchRequest cannot be updated since it has already been fulfilled!
'500':
description: Internal Server Error
operationId: put-api-v2-matching-request-request-id
x-stoplight:
id: f6t3aeqcvup68
Expand All @@ -909,6 +927,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal Server Error
operationId: get-api-v2-matching-rsvp-match-id-accept
x-stoplight:
id: am6b7xnyytanu
Expand All @@ -933,6 +953,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal Server Error
operationId: get-api-v2-matching-rsvp-match-id-reject
description: Reject invitation to a given match
x-stoplight:
Expand All @@ -959,6 +981,8 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal Server Error
operationId: get-api-v2-genai-conversation-starter
requestBody:
content:
Expand Down
Loading