Skip to content

Instantly share code, notes, and snippets.

@perryism
Last active April 26, 2023 22:24
Show Gist options
  • Save perryism/9f3fbdf3f6f64d2c2090d818fcbb3515 to your computer and use it in GitHub Desktop.
Save perryism/9f3fbdf3f6f64d2c2090d818fcbb3515 to your computer and use it in GitHub Desktop.
Vertex AI endpoint openapi 3.0.0 spec
openapi: 3.0.0
info:
title: Vertex AI endpoint spec
version: "1.0.0"
servers:
- url: vertex ai endpoint
description: localhost
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
schemas:
Instance:
type: array
items:
type: number
Instances:
type: array
items:
$ref: '#/components/schemas/Instance'
Request:
type: object
properties:
Instances:
$ref: '#/components/schemas/Instances'
Parameters:
type: object
properties:
coefficients:
type: array
items:
type: number
Response:
type: object
properties:
predictions:
type: array
items:
type: number
deployedModelId:
type: string
model:
type: string
modelDisplayName:
type: string
modelVersionId:
type: string
ErrorMessage:
type: object
properties:
error:
type: string
ErrorObject:
type: object
properties:
error:
type: object
properties:
code:
type: number
message:
type: string
status:
type: string
details:
type: array
items:
$ref: '#/components/schemas/ErrorDetail'
ErrorDetail:
type: object
properties:
"@type":
type: string
fieldViolations:
type: array
items:
$ref: '#/components/schemas/FieldViolation'
FieldViolation:
type: object
properties:
description:
type: string
paths:
:predict:
post:
description: Endpoint to predict values
security:
- BearerAuth: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Request'
example:
instances:
- - 1.9
- 3.1
parameters:
coefficients:
- -0.1068913
- 0.41444855
- -0.2486209
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
400:
description: Bad Request
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ErrorMessage'
- $ref: '#/components/schemas/ErrorObject'
405:
description: Invalid Function Name
500:
description: Internal Server Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment