Skip to content

Commit

Permalink
fix(server): fix and validate open API spec (#1626)
Browse files Browse the repository at this point in the history
* fix(server): fix and validate open API spec

* fix type

* Experimental tag not server
  • Loading branch information
daniellacosse authored Dec 18, 2024
1 parent 9d9f76b commit bfcf59a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build_and_test_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ jobs:
- name: Shadowbox Integration Test
run: ./task shadowbox:integration_test

- name: Verify Open API Spec
uses: mbowman100/swagger-validator-action@master
with:
files: |
src/shadowbox/server/api.yml
manual-install-script:
name: Manual Install Script
runs-on: ubuntu-latest
Expand Down
15 changes: 10 additions & 5 deletions src/shadowbox/server/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ paths:
description: Access key limit deleted successfully.
/experimental/server/metrics:
get:
tags: Server
tags:
- Experimental
parameters:
- in: query
name: since
Expand Down Expand Up @@ -158,11 +159,13 @@ paths:
tunnelTime:
type: object
properties:
seconds: number
seconds:
type: number
dataTransferred:
type: object
properties:
bytes: number
bytes:
type: number
accessKeys:
type: array
items:
Expand All @@ -173,11 +176,13 @@ paths:
tunnelTime:
type: object
properties:
seconds: number
seconds:
type: number
dataTransferred:
type: object
properties:
bytes: number
bytes:
type: number
examples:
'0':
value: '{"server":[{"location":"US","asn":null,"asOrg":null,"tunnelTime":{"seconds":100},"dataTransferred":{"bytes":100}}],"accessKeys":[{"accessKeyId":"0","tunnelTime":{"seconds":100},"dataTransferred":{"bytes":100}}]}'
Expand Down

0 comments on commit bfcf59a

Please sign in to comment.