Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container/http-api #4

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
105 changes: 105 additions & 0 deletions container/http-api/0.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
openapi: 3.0.0
info:
description: Wrap Container APIs
version: "0.0.1"
title: Wrap Containers HTTP API
paths:
/invoke:
post:
summary: Invoke a wrapper
description: Invoke a wrapper given a uri, method and args
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvokeOptions'
responses:
'200':
description: invocation execution successful
content:
application/json:
schema:
$ref: '#/components/schemas/InvokeResult'
'400':
description: bad input parameter
/validate:
post:
summary: Validate a wrapper
description: Validate if a wrapper is compatible with client
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ValidateOptions'
responses:
'200':
description: validation check successful
content:
application/json:
schema:
$ref: '#/components/schemas/ValidateResult'
'400':
description: bad input parameter
/versions/{v}:
get:
summary: Get version of client or wrap
parameters:
- name: "v"
in: "path"
description: "v=client or v=wrap"
required: true
schema:
type: "string"
responses:
'200':
description: 'version of client or wrap'
content:
application/json:
schema:
$ref: '#/components/schemas/Version'


components:
schemas:
InvokeOptions:
type: object
required:
- method
- uri
properties:
method:
type: string
example: method_name
uri:
type: string
example: ens/wrapper.eth
args:
type: object
InvokeResult:
type: object
properties:
data:
type: object
error:
type: object
ValidateOptions:
type: object
properties:
abi:
type: boolean
description: make sure the ABI from 1st level dependencies are available
recursive:
type: boolean
description: check all uris and make sure it can resolve them
ValidateResult:
type: object
properties:
valid:
type: boolean
Version:
type: object
properties:
client:
type: string
wrap:
type: string