-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: We want to publish our API in the public documentation. Modifications: * Copy yaml from internal project * configure build and release workflows Result: When a version is released, create a release with asset in GitHub
- Loading branch information
Showing
20 changed files
with
1,687 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: pages | ||
|
||
on: | ||
push: | ||
branches: [$default-branch] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '21' | ||
cache: 'sbt' | ||
|
||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Preprocess with SBT | ||
run: > | ||
sbt | ||
'set openapi / Preprocess / target := (openapi / target).value / "public" / "openapi"' | ||
'openapi / Preprocess / preprocess' | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: ./openapi/target/public | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Requests | ||
requests: | ||
|
||
# Responses | ||
responses: | ||
|
||
Unauthorized: | ||
description: Unauthorized | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/schemas/Error' | ||
examples: | ||
AccessUnauthorized: | ||
value: | ||
error: "invalid_request" | ||
error_description: "i.g.f.a.s.UnauthorizedException$: Access unauthorized" | ||
|
||
Errors: | ||
description: Error or Validation Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/schemas/Errors' | ||
examples: | ||
Error: | ||
$ref: '#/examples/Error' | ||
|
||
|
||
Error: | ||
description: Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/schemas/Error' | ||
examples: | ||
Error: | ||
$ref: '#/examples/Error' | ||
|
||
ConflictError: | ||
description: Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/schemas/Error' | ||
example: | ||
error: "invalid_request" | ||
error_description: "i.g.f.a.s.RepositoryNameConflictException: There's already a X with the name Y" | ||
|
||
# Schemas | ||
schemas: | ||
Errors: | ||
oneOf: | ||
- $ref: '#/schemas/Error' | ||
|
||
Error: | ||
type: object | ||
properties: | ||
error: | ||
type: string | ||
error_description: | ||
type: string | ||
|
||
CustomDictionary: | ||
type: object | ||
additionalProperties: | ||
type: string | ||
example: | ||
customProperty: "value" | ||
|
||
# Examples | ||
examples: | ||
|
||
Error: | ||
value: | ||
error: "invalid_request" | ||
error_description: "description" | ||
|
||
parameters: | ||
run: | ||
name: run | ||
in: query | ||
required: true | ||
schema: | ||
type: string | ||
description: "run ID available using /runs API or by clicking on the clipboard icon in the runs table" | ||
simulation: | ||
name: simulation | ||
in: query | ||
required: true | ||
schema: | ||
type: string | ||
description: "Simulation ID available using /simulations API or by clicking on the clipboard icon in the simulations table" |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ping: | ||
get: | ||
summary: Ping the server | ||
description: | | ||
Check that the server is responding. | ||
No permission, no authentication needed. | ||
tags: | ||
- Default | ||
responses: | ||
'200': | ||
description: The server pinged back | ||
content: | ||
application/json: | ||
schema: | ||
type: object |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
responses: | ||
InfoResponse: | ||
type: object | ||
description: Server informations | ||
required: | ||
- versions | ||
properties: | ||
versions: | ||
type: object | ||
description: Versions supported | ||
required: | ||
- java | ||
properties: | ||
java: | ||
$ref: '#/responses/VersionSupported' | ||
|
||
VersionSupported: | ||
type: object | ||
description: Bound versions | ||
properties: | ||
min: | ||
type: string | ||
description: Minimum version supported | ||
max: | ||
type: string | ||
description: Maximum version supported |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
info: | ||
get: | ||
summary: Get server informations | ||
tags: | ||
- Info | ||
responses: | ||
'200': | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'components.yaml#/responses/InfoResponse' |
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: Gatling Enterprise Cloud API | ||
description: Documentation of the public Gatling Enterprise Cloud API. To use this API you will need to generate an API token. | ||
version: 'VERSION_PLACEHOLDER' | ||
servers: | ||
- url: '{API_URL}/api/public' | ||
variables: | ||
API_URL: | ||
default: API_URL_PLACEHOLDER | ||
components: | ||
securitySchemes: | ||
ApiKeyAuth: | ||
type: apiKey | ||
in: header | ||
name: authorization | ||
paths: | ||
# Default | ||
/ping: | ||
$ref: 'default/path.yaml#/ping' | ||
|
||
# Simulation | ||
/simulations: | ||
$ref: 'simulation/path.yaml#/simulations' | ||
/simulations/{simulationId}: | ||
$ref: 'simulation/path.yaml#/simulations.one' | ||
/simulations/{simulationId}/classname: | ||
$ref: 'simulation/path.yaml#/simulations.one.classname' | ||
/simulations/team: | ||
$ref: 'simulation/path.yaml#/simulations.team' | ||
/simulations/start: | ||
$ref: 'simulation/path.yaml#/simulations.start' | ||
/simulations/abort: | ||
$ref: 'simulation/path.yaml#/simulations.abort' | ||
/simulations/abortAll: | ||
$ref: 'simulation/path.yaml#/simulations.abortAll' | ||
/summaries/requests: | ||
$ref: 'simulation/path.yaml#/summaries.requests' | ||
|
||
# Runs | ||
/runs: | ||
$ref: 'runs/path.yaml#/runs' | ||
/run: | ||
$ref: 'runs/path.yaml#/run' | ||
/injectors: | ||
$ref: 'runs/path.yaml#/injectors' | ||
/remotes: | ||
$ref: 'runs/path.yaml#/remotes' | ||
/hostnames: | ||
$ref: 'runs/path.yaml#/hostnames' | ||
/scenarios: | ||
$ref: 'runs/path.yaml#/scenarios' | ||
/groups: | ||
$ref: 'runs/path.yaml#/groups' | ||
/requests: | ||
$ref: 'runs/path.yaml#/requests' | ||
/metrics: | ||
$ref: 'runs/path.yaml#/metrics' | ||
/series: | ||
$ref: 'runs/path.yaml#/series' | ||
|
||
# Packages | ||
/artifacts: | ||
$ref: 'pkgs/path.yaml#/packages' | ||
/artifacts/{packageId}: | ||
$ref: 'pkgs/path.yaml#/package' | ||
/artifacts/{packageId}/content: | ||
$ref: 'pkgs/path.yaml#/packages.upload' | ||
|
||
# Teams | ||
/teams: | ||
$ref: 'teams/path.yaml#/teams' | ||
|
||
# Locations | ||
/pools: | ||
$ref: 'pools/path.yaml#/pools' | ||
/search/private-locations: | ||
$ref: 'private-locations/path.yaml#/private-locations' | ||
|
||
# Info | ||
/info: | ||
$ref: 'info/path.yaml#/info' |
Oops, something went wrong.