-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update API endpoints, error codes, schemas, and validation patterns - Improve descriptions and documentation for various components - Add operation IDs and links for operations Signed-off-by: Rodney Osodo <[email protected]>
- Loading branch information
1 parent
d886f31
commit d23d4ca
Showing
5 changed files
with
250 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,11 @@ on: | |
- main | ||
|
||
env: | ||
TOKEN_URL: http://localhost:9002/users/tokens/issue | ||
TOKENS_URL: http://localhost:9002/users/tokens/issue | ||
DOMAINS_URL: http://localhost:8189/domains | ||
USER_IDENTITY: [email protected] | ||
USER_SECRET: 12345678 | ||
DOMAIN_NAME: demo-test | ||
|
||
jobs: | ||
api-test: | ||
|
@@ -37,7 +39,9 @@ jobs: | |
|
||
- name: Set access token | ||
run: | | ||
export USER_TOKEN=$(curl -sSX POST $TOKEN_URL -H "Content-Type: application/json" -d "{\"identity\": \"$USER_IDENTITY\",\"secret\": \"$USER_SECRET\"}" | jq -r .access_token) | ||
export USER_TOKEN=$(curl -sSX POST $TOKENS_URL -H "Content-Type: application/json" -d "{\"identity\": \"$USER_IDENTITY\",\"secret\": \"$USER_SECRET\"}" | jq -r .access_token) | ||
export DOMAIN_ID=$(curl -sSX POST $DOMAINS_URL -H "Content-Type: application/json" -H "Authorization: Bearer $USER_TOKEN" -d "{\"name\":\"$DOMAIN_NAME\",\"alias\":\"$DOMAIN_NAME\"}" | jq -r .id) | ||
export USER_TOKEN=$(curl -sSX POST $TOKENS_URL -H "Content-Type: application/json" -d "{\"identity\": \"$USER_IDENTITY\",\"secret\": \"$USER_SECRET\",\"domain_id\": \"$DOMAIN_ID\"}" | jq -r .access_token) | ||
echo "USER_TOKEN=$USER_TOKEN" >> $GITHUB_ENV | ||
- name: Run Users API tests | ||
|
@@ -49,6 +53,15 @@ jobs: | |
report: false | ||
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links' | ||
|
||
- name: Run Things API tests | ||
uses: schemathesis/action@v1 | ||
with: | ||
schema: api/openapi/things.yml | ||
base-url: http://localhost:9000 | ||
checks: all | ||
report: false | ||
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-unique-data --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links' | ||
|
||
- name: Stop containers | ||
if: always() | ||
run: make run down args="-v" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.