Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(MPDZBS-877): zmscitizenapi into next #674

Open
wants to merge 25 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f7897c6
update readmes
ThomasAFink Sep 10, 2024
e91a517
refactor some functions to base controller class
Sep 17, 2024
a43962e
add zmsapi methods to base controller
Sep 17, 2024
48da06a
add helper methods to base controller
Sep 17, 2024
d64c675
refactored into services and controllers
Sep 18, 2024
686d20a
remove duplicate function definitions
Sep 18, 2024
983c529
move helpers from base controller to new utility helper
Sep 18, 2024
261fd82
add a method
Sep 18, 2024
830421f
Feature mpdzbs 887 zmscitizenapi post reserve appointment and refacto…
ThomasAFink Sep 27, 2024
9d7189f
feat(MPDZBS-877): Merge next into citizenapi branch
ThomasAFink Sep 27, 2024
78b1e1e
feat(MPDZBS-877): Readd zmscitizenapi to github workflow
ThomasAFink Sep 27, 2024
e1d16ad
feat(MPDZBS-877): Readd files lost in github history
ThomasAFink Sep 27, 2024
c19da68
feat(MPDZBS-877): Readd files lost in github history
ThomasAFink Sep 27, 2024
ef0babd
feat(MPDZBS-877): Resolve merge conflict in zmsentities
ThomasAFink Sep 27, 2024
a1073e2
feat(MPDZBS-877): Readd zmscitizenapi schemas to zmsentities deleted …
ThomasAFink Sep 27, 2024
2a69a60
Merge branch 'next' into feature-MPDZBS-877-zmscitizenapi
Sep 30, 2024
773ae9a
(feat MPDZBS-877): update local env cli
Sep 30, 2024
60b370c
Feature mpdzbs 887 zms 2518 zmscitizenapi post update appointment (#587)
ThomasAFink Oct 4, 2024
e3916b9
Merge branch 'next' into feature-MPDZBS-877-zmscitizenapi
ThomasAFink Nov 6, 2024
853cf7c
feat(MPDZBS-877): update .gitignore
ThomasAFink Nov 6, 2024
348785e
cleanup(MPDZBS-877): Improve security and cleanup code
ThomasAFink Nov 6, 2024
f686a23
fix(MPDZBS-877): fix bin configure
ThomasAFink Nov 6, 2024
c15dea6
fix(MPDZBS-877): fix config.example.php
ThomasAFink Nov 6, 2024
957d89c
Merge branch 'next' into feature-MPDZBS-877-zmscitizenapi
ThomasAFink Nov 21, 2024
5d9a5dc
cleanup(MPDZBS-877): merge next into feature branch
ThomasAFink Nov 21, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
php_version: "8.0"
- module: zmscalldisplay
php_version: "8.0"
- module: zmscitizenapi
php_version: "8.0"
- module: zmsmessaging
php_version: "8.0"
- module: zmsstatistic
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
php_version: "8.0"
- module: zmscalldisplay
php_version: "8.0"
- module: zmscitizenapi
php_version: "8.0"
- module: zmsdldb
php_version: "8.0"
- module: zmsentities
Expand Down
8 changes: 8 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ RewriteRule ^terminvereinbarung/calldisplay(.*) /var/www/html/zmscalldisplay/pub
RewriteRule ^terminvereinbarung/calldisplay/+_(.*) /var/www/html/zmscalldisplay/public/_$1 [QSA]


# zmscitizenapi
SetEnvIf Request_URI ^/zmscitizenapi ZMS_MODULE_BASEPATH=/terminvereinbarung/api/citizen
RewriteCond %{REQUEST_URI} !^/terminvereinbarung/api/citizen/+(_|doc)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^terminvereinbarung/api/citizen(.*) /var/www/html/zmscitizenapi/public/index.php?$1 [QSA]
RewriteRule ^terminvereinbarung/api/citizen/+(doc|_)(.*) /var/www/html/zmscitizenapi/public/$1$2 [QSA]


# zmsstatistic
SetEnvIf Request_URI ^/zmsstatistic ZMS_MODULE_BASEPATH=/terminvereinbarung/statistic
RewriteCond %{REQUEST_URI} !^/terminvereinbarung/[^/]+/+_
Expand Down
1 change: 1 addition & 0 deletions cli
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ modules = [
"zmsadmin",
"zmsapi",
"zmscalldisplay",
"zmscitizenapi",
"zmsclient",
"zmsdb",
"zmsdldb",
Expand Down
2 changes: 1 addition & 1 deletion mellon/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
convertWarningsToExceptions="true"
processIsolation="false"
forceCoversAnnotation="false"
stopOnFailure="true"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"$schema": "https://schema.berlin.de/queuemanagement/metaresult.json",
"error": false,
"generated": "2019-02-11T16:07:58+01:00",
"server": "Zmsapi-ENV (v2.19.02-38-g0ba2cba)"
"server": "Zmsapi"
},
"data": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"$schema": "https://schema.berlin.de/queuemanagement/metaresult.json",
"error": false,
"generated": "2019-02-11T16:07:58+01:00",
"server": "Zmsapi-ENV (v2.19.02-38-g0ba2cba)"
"server": "Zmsapi"
},
"data": [
{
Expand Down
2 changes: 1 addition & 1 deletion zmsadmin/tests/Zmsadmin/fixtures/GET_source_unittest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"$schema": "https://schema.berlin.de/queuemanagement/metaresult.json",
"error": false,
"generated": "2019-02-08T14:45:15+01:00",
"server": "Zmsapi-ENV (v2.19.02-38-g0ba2cba)"
"server": "Zmsapi"
},
"data": {
"$schema": "https://schema.berlin.de/queuemanagement/source.json",
Expand Down
16 changes: 16 additions & 0 deletions zmsapi/public/doc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
## How does the Open Api definition work
## Version 2.0

```
bin/configure
npm i
npm run build
npm run doc
swagger-cli bundle -o public/doc/swagger.json public/doc/swagger.yaml
python3 -m http.server 8001
```

Reachable at:
```
http://[::]:8001/public/doc/
https://zms.ddev.site/terminvereinbarung/api/2/doc/index.html
https://it-at-m.github.io/eappointment/zmsapi/public/doc/index.html
```

* Under /public/doc are the schema from zmsentities. A symbolic link points to the corresponding folder under vendor/eappointment/zmsentities/schema.

* Under /bin there is a build_swagger.js file. This is executed via ``npm run doc`` and validates the existing swagger.yaml file. If valid, the open api annotations are read from routing.php and the remaining information such as info, definitions, version and tags are compiled from the yaml files under ./partials into a complete swagger.yaml.
Expand Down
196 changes: 0 additions & 196 deletions zmscalldisplay/package-lock.json

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

2 changes: 1 addition & 1 deletion zmscalldisplay/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
stopOnFailure="true"
stopOnFailure="false"
verbose="true"
processIsolation="false"
>
Expand Down
17 changes: 17 additions & 0 deletions zmscitizenapi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
node_modules
vendor
vendor.zmsbase
config.php
tags
.DS_*
public/_tests
public/doc/assets/redoc.min.js
public/doc/swagger.*
public/_test/assets/swagger-ui-bundle.js
public/_test/assets/swagger-ui.css
public/_test/assets/swagger-ui-standalone-preset.js
cache
vendor.old
vendor.update
VERSION
.phpunit.result.cache
32 changes: 32 additions & 0 deletions zmscitizenapi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.PHONY: help now dev live watch fix openapi coverage paratest

help: # This help
@echo "Possible Targets:"
@grep -P "^\w+:" Makefile|sort|perl -pe 's/^(\w+):([^\#]+)(\#\s*(.*))?/ \1\n\t\4\n/'

now: # Dummy target

dev: # init development system
COMPOSER=composer.json composer update
npm install

live: # init live system, delete unnecessary libs
composer install --no-dev --prefer-dist
bin/configure
npm install
npm run build
npm run doc
npx swagger-cli bundle -o public/doc/swagger.json public/doc/swagger.yaml

fix: # run code fixing
php vendor/bin/phpcbf --standard=psr2 src/
php vendor/bin/phpcbf --standard=psr2 tests/

openapi: # Swagger docs on changes
./bin/doc

coverage:
php vendor/bin/phpunit --coverage-html public/_tests/coverage/

paratest: # init parallel unit testing with 5 processes
vendor/bin/paratest -p20 --coverage-html public/_tests/coverage/
Loading
Loading