Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/flask_ml/flask_ml_server/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2024-11-01T23:07:49+00:00
# timestamp: 2025-01-15T12:55:32+00:00

from __future__ import annotations

Expand All @@ -27,7 +27,7 @@ class SchemaAPIRoute(BaseModel):
task_schema: Annotated[str, Field(examples=['/tasks/{name_of_task}/task_schema'])]
run_task: Annotated[str, Field(examples=['/tasks/{name_of_task}'])]
payload_schema: Annotated[str, Field(examples=['/tasks/{name_of_task}/payload_schema'])]
sample_payload: Annotated[Optional[str], Field(examples=['/tasks/{name_of_task}/sample_payload'])] = None
sample_payload: Annotated[str, Field(examples=['/tasks/{name_of_task}/sample_payload'])]
short_title: Annotated[str, Field(examples=['{A short title for the task}'])]
order: Annotated[int, Field(examples=[1])]

Expand Down
74 changes: 12 additions & 62 deletions src/flask_ml/flask_ml_server/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

openapi: 3.0.0
openapi: 3.1.0
info:
title: FlaskML
version: 1.0.0
Expand Down Expand Up @@ -27,63 +26,6 @@ paths:
schema:
$ref: '#/components/schemas/APIRoutes'

/tasks/generate_db/task_schema:
get:
summary: Get Input Schema for Generating Database
responses:
'200':
description: Input schema for generating database
content:
application/json:
schema:
$ref: '#/components/schemas/TaskSchema'

/tasks/generate_db:
post:
summary: Run Task to Generate Database
requestBody:
description: Inputs and parameters for generating database
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RequestBody'
responses:
'200':
description: Task completed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseBody'

/tasks/face_match/task_schema:
get:
summary: Get Input Schema for Face Matching
responses:
'200':
description: Input schema for face matching
content:
application/json:
schema:
$ref: '#/components/schemas/TaskSchema'

/tasks/face_match:
post:
summary: Run Task to Perform Face Matching
requestBody:
description: Inputs and parameters for face matching
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RequestBody'
responses:
'200':
description: Task completed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseBody'
components:
schemas:
# Info Page models
Expand Down Expand Up @@ -114,7 +56,7 @@ components:

SchemaAPIRoute:
type: object
required: [task_schema, run_task, payload_schema, short_title, order]
required: [task_schema, run_task, payload_schema, sample_payload, short_title, order]
properties:
task_schema:
type: string
Expand All @@ -137,7 +79,7 @@ components:

NoSchemaAPIRoute:
type: object
required: [run_task, short_title, order]
required: [run_task]
properties:
run_task:
type: string
Expand Down Expand Up @@ -245,11 +187,12 @@ components:

NewFileInputType:
type: object
required: [inputType, defaultExtension, allowedExtensions]
required: [defaultExtension, allowedExtensions, inputType]
properties:
defaultName:
type: string
example: "my_file"
nullable: true
defaultExtension:
type: string
example: ".db"
Expand Down Expand Up @@ -342,6 +285,7 @@ components:
type: string
messageWhenEmpty:
type: string
nullable: true
default:
type: string

Expand Down Expand Up @@ -446,8 +390,10 @@ components:
type: string
title:
type: string
nullable: true
subtitle:
type: string
nullable: true

DirectoryResponse:
type: object
Expand Down Expand Up @@ -483,8 +429,10 @@ components:
type: string
title:
type: string
nullable: true
subtitle:
type: string
nullable: true

TextResponse:
type: object
Expand All @@ -501,8 +449,10 @@ components:
type: string
title:
type: string
nullable: true
subtitle:
type: string
nullable: true


BatchFileResponse:
Expand Down
Loading