Skip to content

Commit

Permalink
Migration to express-jsdoc-swagger (#114)
Browse files Browse the repository at this point in the history
* Changed the swagger.ts to use the new express-jsdoc-swagger. Changing all the files will be a gigantic hassle, but running swagger:validate will show if the generated swagger is valid.

It does not show if the swagger contains everything you expect it to.

* Migrated:
banner-response.ts
base-response.ts
pagination.ts
root-controller.ts

* Migrated:
authentication-controller.ts
authentication-response.ts
all authentication requests
user-response.ts

* Migrated:
authentication-secure-controller.ts

* Migrated:
all responses,
balance-controller.ts
and some entities

* Migrated:
all requests

* Migrated:
banner-controller.ts

* Migrated:
container-controller.ts

* Migrated:
debtor-controller.ts

* Migrated:
event-controller.ts

* Migrated:
event-shift-controller.ts

* Migrated all controllers

* Small remaining changes and mistakes

* Rebased on dev

* Added logging

* Started working on fixing the test files / finding out whats going wrong.

* TODO Fix code to use specification.component.schemas instead of specification.definitions

* Fixed test cases and some of the spec errors that came up.

* Small test to fix CI

* Small test to fix CI

* Update build.yml

* Added swagger-cli as devtool

* Continued CI/CD testsuite bug fixing.

* Continued CI/CD testsuite bug fixing.

* Cleaned swagger.ts and removed old dep.

* Missed a dangling endpoint

* Small changes to try and fix runner

* Fixed the stupid mistake

* Function signature changed.

* Small fix in test model

* Small fix in test model path

* Small typo

* Small error fix

* Changed generateSpecification params to include file patterns.

* Removed all entity swagger doc to only leave Responses

* Undid all the changes to the entities swaggerdoc since these are unused.

* Applied requested pull changes.

* Applied requested pull changes.
  • Loading branch information
JustSamuel authored Jan 2, 2024
1 parent e720d09 commit f506542
Show file tree
Hide file tree
Showing 111 changed files with 1,546 additions and 1,581 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
- run: npm install
if: steps.cache-node.outputs.cache-hit != 'true'
- run: openssl genrsa -out ./config/jwt.key 2048 && chmod 0777 ./config/jwt.key
- run: npm run swagger
- run: npm run swagger:validate
- run: npm run coverage-ci # Separate command to limit the number of workers to prevent timeouts
- run: git config --global --add safe.directory $GITHUB_WORKSPACE # To avoid dubious ownership
if: ${{ matrix.typeorm-connection == 'mariadb' }}
Expand Down
2 changes: 1 addition & 1 deletion .run/Template Mocha.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<working-directory />
<pass-parent-env>true</pass-parent-env>
<ui />
<extra-mocha-options>-r ts-node/register --timeout 50000 --file ./test/setup.ts --reporter mocha-multi-reporters --reporter-options configFile=mocha.json</extra-mocha-options>
<extra-mocha-options>-r ts-node/register --timeout 50000 --require ./test/setup.ts --reporter mocha-multi-reporters --reporter-options configFile=mocha.json</extra-mocha-options>
<test-kind>DIRECTORY</test-kind>
<test-directory />
<recursive>false</recursive>
Expand Down
Loading

0 comments on commit f506542

Please sign in to comment.