-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: define api and generate swagger file
Signed-off-by: richardli1598 <opennaslab@gmail.com>
- Loading branch information
1 parent
05f2310
commit 9874067
Showing
14 changed files
with
519 additions
and
63 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,107 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "Take you to the land of light, the city of freedom(A unified external service management system for NAS).", | ||
"title": "bifrost API", | ||
"termsOfService": "http://swagger.io/terms/", | ||
"contact": {}, | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | ||
}, | ||
"version": "0.1" | ||
}, | ||
"basePath": "/api/v1", | ||
"paths": { | ||
"/steps": { | ||
"get": { | ||
"description": "List all supported bifrost steps", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Steps" | ||
], | ||
"summary": "List all bifrost steps", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/opennaslab_io_bifrost_pkg_customapi.StepInfoList" | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal Server Error", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"opennaslab_io_bifrost_pkg_customapi.Documentation": { | ||
"type": "object", | ||
"properties": { | ||
"description": { | ||
"type": "string" | ||
}, | ||
"items": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/opennaslab_io_bifrost_pkg_customapi.Documentation" | ||
} | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"required": { | ||
"type": "boolean" | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"opennaslab_io_bifrost_pkg_customapi.StepInfo": { | ||
"type": "object", | ||
"properties": { | ||
"description": { | ||
"type": "string" | ||
}, | ||
"image": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"parameters": { | ||
"$ref": "#/definitions/opennaslab_io_bifrost_pkg_customapi.StepParameter" | ||
} | ||
} | ||
}, | ||
"opennaslab_io_bifrost_pkg_customapi.StepInfoList": { | ||
"type": "object", | ||
"properties": { | ||
"steps": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/opennaslab_io_bifrost_pkg_customapi.StepInfo" | ||
} | ||
} | ||
} | ||
}, | ||
"opennaslab_io_bifrost_pkg_customapi.StepParameter": { | ||
"type": "object", | ||
"properties": { | ||
"in": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/opennaslab_io_bifrost_pkg_customapi.Documentation" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,71 @@ | ||
basePath: /api/v1 | ||
definitions: | ||
opennaslab_io_bifrost_pkg_customapi.Documentation: | ||
properties: | ||
description: | ||
type: string | ||
items: | ||
items: | ||
$ref: '#/definitions/opennaslab_io_bifrost_pkg_customapi.Documentation' | ||
type: array | ||
name: | ||
type: string | ||
required: | ||
type: boolean | ||
type: | ||
type: string | ||
type: object | ||
opennaslab_io_bifrost_pkg_customapi.StepInfo: | ||
properties: | ||
description: | ||
type: string | ||
image: | ||
type: string | ||
name: | ||
type: string | ||
parameters: | ||
$ref: '#/definitions/opennaslab_io_bifrost_pkg_customapi.StepParameter' | ||
type: object | ||
opennaslab_io_bifrost_pkg_customapi.StepInfoList: | ||
properties: | ||
steps: | ||
items: | ||
$ref: '#/definitions/opennaslab_io_bifrost_pkg_customapi.StepInfo' | ||
type: array | ||
type: object | ||
opennaslab_io_bifrost_pkg_customapi.StepParameter: | ||
properties: | ||
in: | ||
items: | ||
$ref: '#/definitions/opennaslab_io_bifrost_pkg_customapi.Documentation' | ||
type: array | ||
type: object | ||
info: | ||
contact: {} | ||
description: Take you to the land of light, the city of freedom(A unified external | ||
service management system for NAS). | ||
license: | ||
name: Apache 2.0 | ||
url: http://www.apache.org/licenses/LICENSE-2.0.html | ||
termsOfService: http://swagger.io/terms/ | ||
title: bifrost API | ||
version: "0.1" | ||
paths: | ||
/steps: | ||
get: | ||
description: List all supported bifrost steps | ||
produces: | ||
- application/json | ||
responses: | ||
"200": | ||
description: OK | ||
schema: | ||
$ref: '#/definitions/opennaslab_io_bifrost_pkg_customapi.StepInfoList' | ||
"500": | ||
description: Internal Server Error | ||
schema: | ||
type: string | ||
summary: List all bifrost steps | ||
tags: | ||
- Steps | ||
swagger: "2.0" |
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
Oops, something went wrong.