Skip to content

Commit

Permalink
feat: add missing versionless OpenAPI routes
Browse files Browse the repository at this point in the history
  • Loading branch information
zevisert committed Nov 27, 2023
1 parent 23f13af commit 68c2056
Showing 1 changed file with 87 additions and 6 deletions.
93 changes: 87 additions & 6 deletions specification/protocol/open_inference_rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,30 @@ paths:
in: path
required: true
get:
summary: Model Ready
summary: Model Version Ready
tags: []
responses:
'200':
description: OK
operationId: check-model-version-readiness
description: The “model ready” health API indicates if a specific model is ready for inferencing. The model name and (optionally) version must be available in the URL. If a version is not provided the server may choose a version based on its own policies.
description: The "model ready" health API indicates if a specific model is ready for inferencing. The model name and version must be provided in the URL.
'/v2/models/{MODEL_NAME}/ready':
parameters:
- schema:
type: string
name: MODEL_NAME
in: path
required: true
get:
summary: Model Ready
tags: []
responses:
'200':
description: OK
operationId: check-model-readiness
description: >
The "model ready" health API indicates if a specific model is ready for inferencing.
The model name is provided in the URL. The server may choose a model version based on its own policies.
/v2/:
get:
summary: Server Metadata
Expand All @@ -77,7 +94,9 @@ paths:
schema:
$ref: '#/components/schemas/metadata_server_error_response'
operationId: read-server-metadata
description: 'The server metadata endpoint provides information about the server. A server metadata request is made with an HTTP GET to a server metadata endpoint. In the corresponding response the HTTP body contains the [Server Metadata Response JSON Object](#server-metadata-response-json-object) or the [Server Metadata Response JSON Error Object](#server-metadata-response-json-error-object).'
description: >
The server metadata endpoint provides information about the server.
Compliant servers return a [Server Metadata Response JSON Object](#server-metadata-response-json-object) or a [Server Metadata Response JSON Error Object](#server-metadata-response-json-error-object).
'/v2/models/{MODEL_NAME}/versions/{MODEL_VERSION}':
parameters:
- schema:
Expand All @@ -91,7 +110,7 @@ paths:
in: path
required: true
get:
summary: Model Metadata
summary: Model Version Metadata
tags: []
responses:
'200':
Expand All @@ -101,7 +120,32 @@ paths:
schema:
$ref: '#/components/schemas/metadata_model_response'
operationId: read-model-version-metadata
description: 'The per-model metadata endpoint provides information about a model. A model metadata request is made with an HTTP GET to a model metadata endpoint. In the corresponding response the HTTP body contains the [Model Metadata Response JSON Object](#model-metadata-response-json-object) or the [Model Metadata Response JSON Error Object](#model-metadata-response-json-error-object). The model name and (optionally) version must be available in the URL. If a version is not provided the server may choose a version based on its own policies or return an error.'
description: >
The per-model metadata endpoint provides information about a model.
Compliant servers return a [Model Metadata Response JSON Object](#model-metadata-response-json-object) or a [Model Metadata Response JSON Error Object](#model-metadata-response-json-error-object).
The model name and version must be provided in the URL.
'/v2/models/{MODEL_NAME}':
parameters:
- schema:
type: string
name: MODEL_NAME
in: path
required: true
get:
summary: Model Metadata
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/metadata_model_response'
operationId: read-model-metadata
description: >
The per-model metadata endpoint provides information about a model.
Compliant servers return a [Model Metadata Response JSON Object](#model-metadata-response-json-object) or a [Model Metadata Response JSON Error Object](#model-metadata-response-json-error-object).
The model name is provided in the URL. The server may choose a model version based on its own policies or return an error.
'/v2/models/{MODEL_NAME}/versions/{MODEL_VERSION}/infer':
parameters:
- schema:
Expand Down Expand Up @@ -135,7 +179,44 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/inference_request'
description: 'An inference request is made with an HTTP POST to an inference endpoint. In the request the HTTP body contains the [Inference Request JSON Object](#inference-request-json-object). In the corresponding response the HTTP body contains the [Inference Response JSON Object](#inference-response-json-object) or [Inference Response JSON Error Object](#inference-response-json-error-object). See [Inference Request Examples](#inference-request-examples) for some example HTTP/REST requests and responses.'
description: >
An inference request is made with an HTTP POST to an inference endpoint.
Compliant servers return an [Inference Response JSON Object](#inference-response-json-object) or an [Inference Response JSON Error Object](#inference-response-json-error-object).
See [Inference Request Examples](#inference-request-examples) for some example HTTP/REST requests and responses.
The model name and version must be provided in the URL.
'/v2/models/{MODEL_NAME}/infer':
parameters:
- schema:
type: string
name: MODEL_NAME
in: path
required: true
post:
summary: Inference
operationId: model-infer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/inference_response'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/inference_error_response'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/inference_request'
description: >
An inference request is made with an HTTP POST to an inference endpoint.
Compliant servers return an [Inference Response JSON Object](#inference-response-json-object) or an [Inference Response JSON Error Object](#inference-response-json-error-object).
See [Inference Request Examples](#inference-request-examples) for some example HTTP/REST requests and responses.
The model name is provided in the URL. The server may choose a model version based on its own policies or return an error.
components:
schemas:
metadata_server_response:
Expand Down

0 comments on commit 68c2056

Please sign in to comment.