-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into new-dynamo-branch2
- Loading branch information
Showing
16 changed files
with
1,589 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: OpenAPI Schema Validation | ||
|
||
on: | ||
push: | ||
paths: | ||
- "backend/openapi/**" | ||
pull_request: | ||
paths: | ||
- "backend/openapi/**" | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check file extensions | ||
run: | | ||
shopt -s globstar | ||
for file in backend/openapi/**/*.yaml; do | ||
if [[ ! "$file" =~ \.openapi\.yaml$ ]]; then | ||
echo "Error: $file does not have the .openapi.yaml extension" | ||
exit 1 | ||
fi | ||
done | ||
- name: Validate OpenAPI files | ||
run: | | ||
yarn add swagger-cli | ||
for file in backend/openapi/*.yaml | ||
do | ||
echo "Validating $file" | ||
yarn swagger-cli validate $file --no-color || exit 1 | ||
done |
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,46 @@ | ||
openapi: "3.0.0" | ||
info: | ||
title: DLP API | ||
description: API endpoints for the Deep Learning Playground Project | ||
version: "1.0.0" | ||
paths: | ||
/api/defaultDataset: | ||
post: | ||
description: Endpoint to get user selected default dataset for training | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
type: string | ||
required: | ||
- using_default_dataset | ||
properties: | ||
using_default_dataset: | ||
type: string | ||
description: dataset selected for training | ||
example: | ||
using_default_dataset: "IRIS" | ||
required: true | ||
responses: | ||
"200": | ||
description: Dataset selected successfully | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
columns: | ||
type: array | ||
example: [col1, col2, col3] | ||
"400": | ||
description: Dataset wasn't selected properly. This is usually something wrong with your code | ||
"401": | ||
description: User is not authenticated | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
error: | ||
type: string | ||
example: "User is not authenticated" |
Oops, something went wrong.