fix(server): fix and validate open API spec (#1626)

* fix(server): fix and validate open API spec

* fix type

* Experimental tag not server
This commit is contained in:
Daniel LaCosse 2024-12-18 10:51:02 -05:00 committed by GitHub
parent 9d9f76b9a5
commit bfcf59a7bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 5 deletions

View file

@ -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

View file

@ -129,7 +129,8 @@ paths:
description: Access key limit deleted successfully.
/experimental/server/metrics:
get:
tags: Server
tags:
- Experimental
parameters:
- in: query
name: since
@ -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:
@ -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}}]}'