Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Fix apidoc syntax #738

Merged
merged 13 commits into from
May 14, 2018
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ script:
- sed -i 's/$TRAVIS_COMMIT/'$TRAVIS_COMMIT'/' src/server.ts
- npm run test # run backend test
- cd ..
- .travis/apidoc-check.sh
# run frontend-tests and return back to root for following steps
- cd app/webFrontend
- npm run lint # run linter
Expand Down
21 changes: 21 additions & 0 deletions .travis/apidoc-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Path to this file
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Path the script was called from
IPWD="$(pwd)"
# Import shared vars
. ${DIR}/_shared-vars.sh


echo
echo "+++ Check API-Doc +++"
echo

if ([ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "develop" ]) || ([ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]); then
echo "+ detected pull request from ($TRAVIS_PULL_REQUEST_BRANCH) to $TRAVIS_BRANCH"
cd api
npm run apidoc
else
echo -e "${YELLOW}+ WARNING: No Pull Request agiainst Develop or Master -> skipping automate api doc check${NC}";
fi
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Validate form before submit when creating a new course. [#724](https://github.com/h-da/geli/pull/724)
- Validate :id for CourseController details route. [#724](https://github.com/h-da/geli/pull/724)

### Fixed
- Fixed broken Apidoc [#737](https://github.com/h-da/geli/issues/737)

## [[0.7.0](https://github.com/h-da/geli/releases/tag/v0.7.0)] - 2018-05-05 - SS 18 intermediate Release
### Added
- Added the possibility to sort all courses alphabetically. [#567](https://github.com/h-da/geli/issues/567)
Expand Down
6 changes: 3 additions & 3 deletions api/src/controllers/CourseController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export class CourseController {
* @apiParam {Object} data Data (with access key).
* @apiParam {IUser} currentUser Currently logged in user.
*
* @apiSuccess {{}} result Empty object.
* @apiSuccess {Object} result Empty object.
*
* @apiSuccessExample {json} Success-Response:
* {}
Expand Down Expand Up @@ -533,7 +533,7 @@ export class CourseController {
* @apiParam {Object} data Body.
* @apiParam {IUser} currentUser Currently logged in user.
*
* @apiSuccess {{}} result Empty object.
* @apiSuccess {Object} result Empty object.
*
* @apiSuccessExample {json} Success-Response:
* {}
Expand Down Expand Up @@ -653,7 +653,7 @@ export class CourseController {
* @apiParam {String} id Course ID.
* @apiParam {IUser} currentUser Currently logged in user.
*
* @apiSuccess {{}} result Empty object.
* @apiSuccess {Object} result Empty object.
*
* @apiSuccessExample {json} Success-Response:
* {}
Expand Down