Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
9b8df2e
init
husakki Dec 8, 2024
88d6a61
wrong graphql name, now fixed
husakki Dec 10, 2024
901dce7
added duplication error
husakki Dec 10, 2024
93f7266
now name is ID
husakki Dec 10, 2024
33e888f
target
husakki Dec 10, 2024
826fef7
new tests added
husakki Dec 10, 2024
af175c7
removed maven build for test
husakki Jan 20, 2025
3e7a37a
Create postmantestci.yml
husakki Jan 20, 2025
d35a7ee
Update postmantestci.yml
husakki Jan 20, 2025
4cebe1b
Update postmantestci.yml
husakki Jan 20, 2025
a1634ea
Update postmantestci.yml now package
husakki Jan 20, 2025
f3c2ef8
Update postmantestci.yml
husakki Jan 20, 2025
4386571
Update postmantestci.yml
husakki Jan 20, 2025
50a8d95
update pomxml
husakki Jan 20, 2025
17f3073
mainclass added
husakki Jan 20, 2025
094deb3
change the path with use-api/..
husakki Jan 20, 2025
ef58bd0
Update maven.yml ls tests
husakki Jan 20, 2025
e325db0
small changes postmantestci.yml
husakki Jan 20, 2025
a806c81
removed the list tar dir
husakki Jan 20, 2025
fa35e98
Update pom.xml
husakki Jan 20, 2025
6ae8bcb
Update postmantestci.yml
husakki Jan 20, 2025
72b22b0
Update maven.yml
husakki Jan 31, 2025
3891c13
Update maven.yml
husakki Jan 31, 2025
bd0b97b
Update maven.yml
husakki Jan 31, 2025
7e6339f
Update maven.yml
husakki Jan 31, 2025
154e149
Update maven.yml
husakki Jan 31, 2025
341e796
Update maven.yml
husakki Jan 31, 2025
70c007a
Update maven.yml
husakki Jan 31, 2025
6e81c75
listing directories
husakki Jan 31, 2025
02dffd1
checkout has to stay in for now
husakki Jan 31, 2025
25c6e4d
there was no dir to begin with
husakki Jan 31, 2025
8b1bf32
removed the checkout again
husakki Jan 31, 2025
a443548
removed graphql
husakki Feb 14, 2025
aacce4f
added the checkout again
husakki Feb 14, 2025
f803b8e
added funtionality
husakki May 27, 2025
4d2dfac
Update application.properties
husakki May 27, 2025
d23e0d3
Update application.properties
husakki May 27, 2025
deee6ae
localhost 8080 no use anymore
husakki May 27, 2025
eb20fcb
Update use-webapi.postman_collection.json
husakki Jun 18, 2025
3be71e6
operation renaming
husakki Jun 18, 2025
4f14f28
Add Dockerfile and clean build artifacts
husakki Sep 25, 2025
b46bd05
Update .gitignore
husakki Sep 25, 2025
abd705c
Comment out test data initialization in UseAPIApplication
husakki Sep 25, 2025
f81b78b
renaming to DTO instead of model
husakki Sep 25, 2025
e8a69ba
DTO postfix added
husakki Sep 25, 2025
9715063
added more DTO's
husakki Sep 25, 2025
e7210c3
added DTO code
husakki Sep 25, 2025
2266d4c
model endpoint with hateoas
husakki Sep 25, 2025
1dbc6ed
Model Get Endpoint added
husakki Sep 25, 2025
536d1cc
dockerfile wrong also need mongodb so now docker compose
husakki Sep 26, 2025
0012d92
simple dockerfile to start the use_web_api
husakki Sep 26, 2025
601dcf8
Enhance CI workflow with Postman and Docker uploads
husakki Sep 26, 2025
550a96c
Small mistake "-"
husakki Sep 26, 2025
941a714
small change...
husakki Sep 29, 2025
27098e4
few deprecated
husakki Sep 29, 2025
3f75e48
get all models endpoint
husakki Sep 29, 2025
9d30a4a
more depr
husakki Sep 29, 2025
a987c85
lombok and correct annotations
husakki Sep 29, 2025
811f091
added mapstruct
husakki Oct 2, 2025
97ec576
depreacted
husakki Oct 2, 2025
2a19493
pomxml addition
husakki Oct 2, 2025
edf3855
Refactor model persistence to use ModelNTT entity
husakki Oct 2, 2025
c05ef7b
clean up
husakki Oct 3, 2025
4725caf
better error handling with globalexceptionhandler
husakki Oct 3, 2025
0c16dc7
no throws
husakki Oct 3, 2025
2358aa3
error handling for dup
husakki Oct 3, 2025
e6d47da
unresolved thought
husakki Oct 3, 2025
e5aeaae
Refactor controllers and services for model API
husakki Oct 5, 2025
03edbb3
clean up the dtos and better classdto
husakki Oct 5, 2025
08ebace
depr. associations
husakki Oct 5, 2025
b5b9ef7
Refactor DTOs and add ClassNTT entity
husakki Oct 5, 2025
862f52d
Refactor class creation and mapping logic
husakki Oct 6, 2025
67d8318
model now has a class when a class is added
husakki Oct 6, 2025
15ec956
get all classes endpoint
husakki Oct 16, 2025
893861e
corrected Invariant and PrePostCond
husakki Oct 16, 2025
bdf6540
service invar
husakki Oct 16, 2025
7af5fa2
Not deprecated
husakki Oct 16, 2025
cf43a0c
invariant endpoint
husakki Oct 16, 2025
2d3233a
post endpoint invariant
husakki Oct 16, 2025
92cd984
deprecated unit tests
husakki Oct 16, 2025
5e187d9
invariant can be added, but need the operation endpoint before that
husakki Oct 31, 2025
0611f39
Update AssociationDTO.java
husakki Nov 2, 2025
1c1abf0
Initial plan
Copilot Oct 30, 2025
2d990c9
Add comprehensive Postman test collection for USE Web API
Copilot Oct 30, 2025
2d184b2
Add association DTO, entity, and mapper
husakki Nov 10, 2025
b309218
assoc get
husakki Nov 10, 2025
321b055
create assoc
husakki Nov 10, 2025
4713e1d
operations and attributes
husakki Nov 10, 2025
4ad9d01
something happend with unknown chars
husakki Nov 10, 2025
dc817a4
class with to be impl endpoints
husakki Nov 10, 2025
6109699
class endpoints
husakki Nov 10, 2025
815e2df
modelcontroller optimize with static imports
husakki Nov 10, 2025
1eb8bf7
format
husakki Nov 10, 2025
cb1454c
class service and moving prepostcondition to model
husakki Nov 13, 2025
e00c0c6
renaming
husakki Nov 13, 2025
ebbcfb2
new repo method and todo
husakki Nov 13, 2025
c6f6784
create operation and attribute
husakki Nov 13, 2025
7cad877
UseModelFacade overhaul with cached models
husakki Nov 15, 2025
e79e8f5
found invariant error
husakki Nov 23, 2025
aa30de6
prepostcondition endpoints
husakki Nov 26, 2025
5af4a27
has to be DTO
husakki Nov 26, 2025
2c121ea
wip
husakki Nov 27, 2025
9fb9f8b
removed wrong and not needed
husakki Dec 1, 2025
a462a66
code cleanup and new method
husakki Dec 1, 2025
394b0a5
model objects and facade
husakki Dec 1, 2025
bee8a21
tmp fix the issues here
husakki Dec 1, 2025
a4b65b2
clean ups
husakki Dec 2, 2025
60195ac
renaming of the main
husakki Dec 2, 2025
27603e2
removed and renamed
husakki Dec 2, 2025
2e5b329
better readability and cleaner code
husakki Dec 2, 2025
ccc8b9e
Refactor UseModelFacade and ModelService method signatures
husakki Dec 2, 2025
a3a8c53
Refactor ModelService for improved clarity and consistency
husakki Dec 2, 2025
c1adfb6
ClassService overhaul cleanup and refactoring
husakki Dec 2, 2025
7ea5392
sorting methodes and improving HATEOAS
husakki Dec 3, 2025
f1c92be
get endpoints better hateoas
husakki Dec 3, 2025
86c395f
HATEOAS improved
husakki Dec 4, 2025
cc846ae
removed comments
husakki Dec 8, 2025
e878701
Enhance class creation to include attributes and operations
husakki Dec 18, 2025
fc49d73
manually added the tests and removed the old one since it deprecated
husakki Dec 18, 2025
53c0588
Update base image in Dockerfile to eclipse-temurin
husakki Dec 18, 2025
7f5156f
removed the sleep and now is healthcheck
husakki Dec 18, 2025
851bb65
Refactor Maven CI workflow and improve Docker handling
husakki Dec 18, 2025
d863cb3
Change base image to eclipse-temurin:21-jdk-slim
husakki Dec 18, 2025
97654e1
Update docker-compose command to use new syntax
husakki Dec 18, 2025
7f27beb
Revert "Refactor Maven CI workflow and improve Docker handling"
husakki Dec 18, 2025
3ce265d
healtcheck actuator
husakki Dec 18, 2025
1a54385
Increase start period for health check to 40 seconds
husakki Dec 18, 2025
e94efec
removed --wait
husakki Dec 18, 2025
6e5a7b4
sleep
husakki Dec 18, 2025
55621b3
removed sleep again
husakki Dec 18, 2025
82cb352
typo
husakki Dec 18, 2025
25b153b
better openapi comments
husakki Dec 18, 2025
a66ff6c
removed todos and comments
husakki Dec 18, 2025
34290c7
Initial plan
Copilot Dec 18, 2025
3a6a4bd
Add delete methods for class, attribute, operation, association, prep…
Copilot Dec 18, 2025
0800de0
removed hardcoded creds
husakki Dec 18, 2025
c79a98f
40s period
husakki Dec 18, 2025
6e3a20d
default values
husakki Dec 18, 2025
9e682d8
Revert "default values"
husakki Dec 18, 2025
9151479
Revert "40s period"
husakki Dec 18, 2025
efb8c0f
Revert "removed hardcoded creds"
husakki Dec 18, 2025
8a4257e
Reapply "removed hardcoded creds"
husakki Dec 18, 2025
38cdbcf
fixed errors, some extra spaces and wrong var names
husakki Dec 18, 2025
1123d92
Need to escape any $ with another $.
husakki Dec 18, 2025
3f9eb59
fixed the syntax and merged the code correctly
husakki Dec 19, 2025
b3b72ac
added use-api module
husakki Dec 19, 2025
50731fd
Update encodings.xml
husakki Dec 19, 2025
eb38b4f
update use-api use version to 7.5.0
husakki Dec 19, 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
136 changes: 105 additions & 31 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,111 @@
name: Java CI with Maven
on:
on:
push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: |
start_time=$(date +%s)
mvn --batch-mode --update-snapshots verify | tee build_output.log
end_time=$(date +%s)
build_time=$((end_time - start_time))
echo "BUILD_TIME_SECONDS=$build_time" >> build_output.log
- name: Upload build result
run: mkdir staging && cp use-assembly/target/*.zip staging
- uses: actions/upload-artifact@v4
with:
name: Package
path: staging
- uses: actions/upload-artifact@v4
with:
name: build-log
path: build_output.log
- uses: actions/upload-artifact@v4
with:
name: failure-reports
path: |
docs/archunit-results/cycles-current-failure-report.txt
docs/archunit-results/layers-current-failure-report.txt
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: |
start_time=$(date +%s)
mvn --batch-mode --update-snapshots verify | tee build_output.log
end_time=$(date +%s)
build_time=$((end_time - start_time))
echo "BUILD_TIME_SECONDS=$build_time" >> build_output.log
- name: Upload build result
run: mkdir staging && cp use-assembly/target/*.zip staging
- uses: actions/upload-artifact@v4
with:
name: Package
path: staging
- uses: actions/upload-artifact@v4
with:
name: build-log
path: build_output.log
- uses: actions/upload-artifact@v4
with:
name: failure-reports
path: |
docs/archunit-results/cycles-current-failure-report.txt
docs/archunit-results/layers-current-failure-report.txt

- name: Upload build result use-api
run: mkdir testphase && cp use-api/target/use-api-7.1.1.jar testphase
- uses: actions/upload-artifact@v4
with:
name: constructed_use-api
path: testphase

- name: Upload postman tests
run: mkdir postmantests && cp use-api/src/it/java/org.tzi.use/postman_collection/use-webapi.postman_collection.json postmantests
- uses: actions/upload-artifact@v4
with:
name: postman_tests
path: postmantests

- name: Upload docker image
run: mkdir docker && cp use-api/docker-compose.yml docker && cp use-api/Dockerfile docker
- uses: actions/upload-artifact@v4
with:
name: docker_image
path: docker



test:
needs: build
runs-on: ubuntu-latest

steps:
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'


- name: Download Artifact use-api jar
uses: actions/download-artifact@v4
with:
name: constructed_use-api

- name: Download Artifact postman tests
uses: actions/download-artifact@v4
with:
name: postman_tests

- name: Download Aritfact Dockerimage
uses: actions/download-artifact@v4
with:
name: docker_image

- name: move the jar
run: mkdir target && cp use-api-7.1.1.jar target

- name: Run docker compose
run: docker compose up -d --wait
env:
MONGODB_USERNAME: ${{ secrets.MONGODB_USERNAME }}
MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }}
MONGODB_DATABASE: ${{ secrets.MONGODB_DATABASE }}
MONGODB_HOST: mongodb_cicd


- name: Wait for docker to be ready
run: sleep 20

- name: Run Postman tests
run: |
npm install -g newman
newman run use-webapi.postman_collection.json

- name: Stop services
if: always()
run: docker compose down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,6 @@ fabric.properties
/use-assembly/target

**/.DS_Store
/.idea
/use-api/target
use-api/.env
17 changes: 17 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<module>use-assembly</module>
<module>use-core</module>
<module>use-gui</module>
<module>use-api</module>
</modules>

<properties>
Expand Down
5 changes: 5 additions & 0 deletions use-api/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MONGODB_USERNAME=your_username
MONGODB_PASSWORD=your_password
MONGODB_DATABASE=use-database
MONGODB_PORT=27017
MONGODB_HOST=localhost
9 changes: 9 additions & 0 deletions use-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM eclipse-temurin:21-jdk

WORKDIR /app

COPY target/use-api-*.jar app.jar

EXPOSE 8080

ENTRYPOINT ["java","-jar","app.jar"]
37 changes: 37 additions & 0 deletions use-api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: '3.8'

services:
mongodb:
image: mongo:latest
container_name: mongodb_cicd
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGODB_USERNAME:-rootuser}
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_PASSWORD:-rootpass}
- MONGO_INITDB_DATABASE=${MONGODB_DATABASE:-use-database}

use-api:
build: .
container_name: use-api
ports:
- "8080:8080"
depends_on:
- mongodb
environment:
- SPRING_DATA_MONGODB_HOST=${MONGODB_HOST:-mongodb_cicd}
- SPRING_DATA_MONGODB_PORT=${MONGODB_PORT:-27017}
- SPRING_DATA_MONGODB_USERNAME=${MONGODB_USERNAME:-rootuser}
- SPRING_DATA_MONGODB_PASSWORD=${MONGODB_PASSWORD:-rootpass}
- SPRING_DATA_MONGODB_DATABASE=${MONGODB_DATABASE:-use-database}
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/actuator/health" ]
interval: 5s
timeout: 5s
retries: 10
start_period: 30s

volumes:
mongodb_data:
Loading