Last active
October 1, 2019 01:53
-
-
Save Laeyoung/63de6e8a5901fbdc4c2fdfeb3d5ef689 to your computer and use it in GitHub Desktop.
tf-resnet OpenAPI 3.0 Spec
This file contains hidden or 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
{ | |
"openapi": "3.0.0", | |
"info": { | |
"title": "TensorFlow Resnet API by Ainize", | |
"version": "0.1.1" | |
}, | |
"servers": [ | |
{ | |
"url": "http://34.85.117.64:8501/v1/models" | |
} | |
], | |
"paths": { | |
"/resnet": { | |
"get": { | |
"operationId": "status", | |
"summary": "Get status", | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"examples": { | |
"pooh": { | |
"value": { | |
"model_version_status": [ | |
{ | |
"version": "1538687457", | |
"state": "AVAILABLE", | |
"status": { | |
"error_code": "OK", | |
"error_message": "" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/resnet/metadata": { | |
"get": { | |
"operationId": "metadata", | |
"summary": "Get model's metadat", | |
"responses": { | |
"200": { | |
"description": "200 response" | |
} | |
} | |
} | |
}, | |
"/resnet:predict": { | |
"post": { | |
"operationId": "predict", | |
"summary": "Predict object class of given image", | |
"requestBody": { | |
"description": "subscription payload", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"instances": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"b64": { | |
"type": "string", | |
"format": "byte" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "200 response", | |
"content": { | |
"application/json": { | |
"examples": { | |
"pooh": { | |
"value": { | |
"predictions": [ | |
{ | |
"classes": 208, | |
"probabilities": [ | |
"1.32371497e-06", | |
"9.01561236e-07" | |
] | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment