Skip to content

Commit

Permalink
schema for model form data w/signoff
Browse files Browse the repository at this point in the history
Signed-off-by: Jougan-0 <prasantmishra2018@gmail.com>
  • Loading branch information
Jougan-0 committed Sep 19, 2024
1 parent 8e06d5f commit 9f2f334
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 43 deletions.
34 changes: 25 additions & 9 deletions models/v1beta1/import.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 81 additions & 34 deletions schemas/constructs/openapi/mesheryHandlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,87 @@ info:
title: Meshmodels API
description: API for registering and exporting mesh models
version: 1.0.0
components:
schemas:
ImportRequest:
type: object
required:
- importBody
- uploadType
- register
properties:
importBody:
$ref: '#/components/schemas/ImportBody'
uploadType:
type: string
register:
type: boolean
nullable: false

ImportBody:
type: object
required:
- model_file
- url
- file_name
- model
properties:
model_file:
type: string
format: byte
description: "This represents the binary content of the file as a byte array"
url:
type: string
file_name:
type: string
model:
$ref: '#/components/schemas/Model'

Model:
type: object
required:
- modelDisplayName
- registrant
- model
- category
- subCategory
- shape
- primaryColor
- secondaryColor
- svgColor
- svgWhite
- svgComplete
- isAnnotation
- publishToRegistry
properties:
modelDisplayName:
type: string
registrant:
type: string
model:
type: string
category:
type: string
subCategory:
type: string
shape:
type: string
primaryColor:
type: string
pattern: "^#[0-9A-Fa-f]{6}$"
secondaryColor:
type: string
pattern: "^#[0-9A-Fa-f]{6}$"
svgColor:
type: string
svgWhite:
type: string
svgComplete:
type: string
isAnnotation:
type: boolean
publishToRegistry:
type: boolean

paths:
/api/meshmodels/register:
Expand Down Expand Up @@ -73,37 +154,3 @@ paths:
'500':
description: Internal server error

components:
schemas:
ImportRequest:
type: object
required:
- importBody
- uploadType
- register
properties:
importBody:
$ref: '#/components/schemas/ImportBody'
uploadType:
type: string
register:
type: boolean
nullable: false

ImportBody:
type: object
required:
- model_file
- url
- file_name
properties:
model_file:
type: string
format: byte
description: "This represents the binary content of the file as a byte array"
url:
type: string

file_name:
type: string

0 comments on commit 9f2f334

Please sign in to comment.