diff --git a/openapi/engine.oas3.json b/openapi/engine.oas3.json index f83551d80b..8f618d1d58 100644 --- a/openapi/engine.oas3.json +++ b/openapi/engine.oas3.json @@ -14,7 +14,7 @@ }, "servers": [ { - "url": "http://{host}:{port}", + "url": "https://{host}:{port}", "variables": { "host": { "default": "localhost", @@ -26,13 +26,14 @@ } }, { - "url": "http://localhost:8002", + "url": "https://localhost:8002", "description": "fixed host as swagger UI has bug with variables for auth" } ], "paths": { "/seldon/{namespace}/{deployment}/api/v1.0/predictions": { "post": { + "security": [{"HTTPBearer": []}], "operationId": "Predict", "responses": { "200": { @@ -52,7 +53,9 @@ "in": "path", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 } }, { @@ -60,7 +63,9 @@ "in": "path", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 } } ], @@ -92,13 +97,17 @@ }, "text/*": { "schema": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 } }, "application/octet-stream": { "schema": { "type": "string", - "format": "binary" + "format": "binary", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 } } }, @@ -108,6 +117,7 @@ }, "/seldon/{namespace}/{deployment}/api/v1.0/feedback": { "post": { + "security": [{"HTTPBearer": []}], "operationId": "SendFeedback", "responses": { "200": { @@ -127,7 +137,9 @@ "in": "path", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 } }, { @@ -135,7 +147,9 @@ "in": "path", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 } } ], @@ -156,9 +170,17 @@ } }, "components": { + "securitySchemes": { + "HTTPBearer": { + "type": "http", + "scheme": "bearer" + } + }, "schemas": { "StatusStatusFlag": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "enum": [ "SUCCESS", "FAILURE" @@ -170,6 +192,8 @@ }, "MetricType": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "enum": [ "COUNTER", "GAUGE", @@ -179,12 +203,15 @@ }, "Metric": { "type": "object", + "additionalProperties": false, "properties": { "type": { "$ref": "#/components/schemas/MetricType" }, "key": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 }, "value": { "type": "number", @@ -194,11 +221,15 @@ }, "DefaultData": { "type": "object", + "additionalProperties": false, "properties": { "names": { "type": "array", + "maxItems": 2097152, "items": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 } }, "tensor": { @@ -206,6 +237,7 @@ }, "ndarry": { "type": "array", + "maxItems": 2097152, "items": { "$ref": "#/components/schemas/AnyValue" } @@ -217,6 +249,7 @@ }, "Feedback": { "type": "object", + "additionalProperties": false, "properties": { "request": { "$ref": "#/components/schemas/SeldonMessage" @@ -235,9 +268,12 @@ }, "Meta": { "type": "object", + "additionalProperties": false, "properties": { "puid": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 }, "tags": { "type": "object", @@ -261,7 +297,9 @@ "requestPath": { "type": "object", "additionalProperties": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 }, "example": { "classifier": "seldonio/mock_classifier:1.0" @@ -269,6 +307,7 @@ }, "metrics": { "type": "array", + "maxItems": 2097152, "items": { "$ref": "#/components/schemas/Metric" } @@ -277,6 +316,7 @@ }, "SeldonMessage": { "type": "object", + "additionalProperties": false, "properties": { "status": { "$ref": "#/components/schemas/Status" @@ -289,18 +329,24 @@ }, "binData": { "type": "string", - "format": "byte" + "format": "byte", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 }, "strData": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 } } }, "SeldonMessageList": { "type": "object", + "additionalProperties": false, "properties": { "seldonMessages": { "type": "array", + "maxItems": 2097152, "items": { "$ref": "#/components/schemas/SeldonMessage" } @@ -309,16 +355,21 @@ }, "Status": { "type": "object", + "additionalProperties": false, "properties": { "code": { "type": "integer", "format": "int32" }, "info": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 }, "reason": { - "type": "string" + "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152 }, "status": { "$ref": "#/components/schemas/StatusStatusFlag" @@ -327,9 +378,11 @@ }, "Tensor": { "type": "object", + "additionalProperties": false, "properties": { "shape": { "type": "array", + "maxItems": 2097152, "items": { "type": "integer", "format": "int32" @@ -337,6 +390,7 @@ }, "values": { "type": "array", + "maxItems": 2097152, "items": { "type": "number", "format": "double" @@ -346,14 +400,19 @@ }, "TensorShapeProtoDim": { "type": "object", + "additionalProperties": false, "properties": { "size": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "format": "int64", - "description": "Size of the tensor in that dimension.\nThis value must be >= -1, but values of -1 are reserved for \"unknown\"\nshapes (values of -1 mean \"unknown\" dimension). Certain wrappers\nthat work with TensorShapeProto may fail at runtime when deserializing\na TensorShapeProto containing a dim value of -1." + "description": "Size of the tensor in that dimension. This value must be >= -1, but values of -1 are reserved for \"unknown\" shapes (values of -1 mean \"unknown\" dimension). Certain wrappers that work with TensorShapeProto may fail at runtime when deserializing a TensorShapeProto containing a dim value of -1." }, "name": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "description": "Optional name of the tensor dimension." } }, @@ -361,6 +420,8 @@ }, "TensorflowDataType": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "enum": [ "DT_INVALID", "DT_FLOAT", @@ -411,38 +472,50 @@ "DT_UINT64_REF" ], "default": "DT_INVALID", - "description": "- DT_INVALID: Not a legal value for DataType. Used to indicate a DataType field\nhas not been set.\n - DT_FLOAT: Data types that all computation devices are expected to be\ncapable to support.\n - DT_FLOAT_REF: Do not use! These are only for parameters. Every enum above\nshould have a corresponding value below (verified by types_test).", + "description": "- DT_INVALID: Not a legal value for DataType. Used to indicate a DataType field has not been set. - DT_FLOAT: Data types that all computation devices are expected to be capable to support. - DT_FLOAT_REF: Do not use! These are only for parameters. Every enum above should have a corresponding value below (verified by types_test).", "title": "LINT.IfChange" }, "TensorflowResourceHandleProto": { "type": "object", + "additionalProperties": false, "properties": { "device": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "description": "Unique name for the device containing the resource." }, "container": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "description": "Container in which this resource is placed." }, "name": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "description": "Unique name of this resource." }, "hash_code": { "type": "string", "format": "uint64", - "description": "Hash code for the type of the resource. Is only valid in the same device\nand in the same execution." + "pattern": "^.{1,2097152}", + "maxLength": 2097152, + "description": "Hash code for the type of the resource. Is only valid in the same device and in the same execution." }, "maybe_type_name": { "type": "string", - "description": "For debug-only, the name of the type pointed to by this handle, if\navailable." + "pattern": "^.{1,2097152}", + "maxLength": 2097152, + "description": "For debug-only, the name of the type pointed to by this handle, if available." } }, - "description": "Protocol buffer representing a handle to a tensorflow resource. Handles are\nnot valid across executions, but can be serialized back and forth from within\na single run." + "description": "Protocol buffer representing a handle to a tensorflow resource. Handles are not valid across executions, but can be serialized back and forth from within a single run." }, "TensorflowTensorProto": { "type": "object", + "additionalProperties": false, "properties": { "dtype": { "$ref": "#/components/schemas/TensorflowDataType" @@ -454,23 +527,26 @@ "version_number": { "type": "integer", "format": "int32", - "description": "Version number.\n\nIn version 0, if the \"repeated xxx\" representations contain only one\nelement, that element is repeated to fill the shape. This makes it easy\nto represent a constant Tensor with a single value." + "description": "Version number.\nIn version 0, if the \"repeated xxx\" representations contain only one element, that element is repeated to fill the shape. This makes it easy to represent a constant Tensor with a single value." }, "tensor_content": { "type": "string", + "pattern": ".* maxLength: 2097152", "format": "byte", - "description": "Serialized raw tensor content from either Tensor::AsProtoTensorContent or\nmemcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation\ncan be used for all tensor types. The purpose of this representation is to\nreduce serialization overhead during RPC call by avoiding serialization of\nmany repeated small items." + "description": "Serialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation can be used for all tensor types. The purpose of this representation is to reduce serialization overhead during RPC call by avoiding serialization of many repeated small items." }, "half_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "integer", "format": "int32" }, - "description": "DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll\nhave some pointless zero padding for each value here." + "description": "DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here." }, "float_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "number", "format": "float" @@ -479,6 +555,7 @@ }, "double_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "number", "format": "double" @@ -487,6 +564,7 @@ }, "int_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "integer", "format": "int32" @@ -495,30 +573,38 @@ }, "string_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "format": "byte" }, "title": "DT_STRING" }, "scomplex_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "number", "format": "float" }, - "description": "DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real\nand imaginary parts of i-th single precision complex." + "description": "DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex." }, "int64_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "format": "int64" }, "title": "DT_INT64" }, "bool_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "boolean", "format": "boolean" @@ -527,14 +613,16 @@ }, "dcomplex_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "number", "format": "double" }, - "description": "DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real\nand imaginary parts of i-th double precision complex." + "description": "DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex." }, "resource_handle_val": { "type": "array", + "maxItems": 2097152, "items": { "$ref": "#/components/schemas/TensorflowResourceHandleProto" }, @@ -542,6 +630,7 @@ }, "variant_val": { "type": "array", + "maxItems": 2097152, "items": { "$ref": "#/components/schemas/TensorflowVariantTensorDataProto" }, @@ -549,6 +638,7 @@ }, "uint32_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "integer", "format": "int64" @@ -557,8 +647,11 @@ }, "uint64_val": { "type": "array", + "maxItems": 2097152, "items": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "format": "uint64" }, "title": "DT_UINT64" @@ -568,36 +661,44 @@ }, "TensorflowTensorShapeProto": { "type": "object", + "additionalProperties": false, "properties": { "dim": { "type": "array", + "maxItems": 2097152, "items": { "$ref": "#/components/schemas/TensorShapeProtoDim" }, - "description": "Dimensions of the tensor, such as {\"input\", 30}, {\"output\", 40}\nfor a 30 x 40 2D tensor. If an entry has size -1, this\ncorresponds to a dimension of unknown size. The names are\noptional.\n\nThe order of entries in \"dim\" matters: It indicates the layout of the\nvalues in the tensor in-memory representation.\n\nThe first entry in \"dim\" is the outermost dimension used to layout the\nvalues, the last entry is the innermost dimension. This matches the\nin-memory layout of RowMajor Eigen tensors.\n\nIf \"dim.size()\" > 0, \"unknown_rank\" must be false." + "description": "Dimensions of the tensor, such as {\"input\", 30}, {\"output\", 40} for a 30 x 40 2D tensor. If an entry has size -1, this corresponds to a dimension of unknown size. The names are optional.\nThe order of entries in \"dim\" matters: It indicates the layout of the values in the tensor in-memory representation.\nThe first entry in \"dim\" is the outermost dimension used to layout the values, the last entry is the innermost dimension. This matches the in-memory layout of RowMajor Eigen tensors.\nIf \"dim.size()\" > 0, \"unknown_rank\" must be false." }, "unknown_rank": { "type": "boolean", "format": "boolean", - "description": "If true, the number of dimensions in the shape is unknown.\n\nIf true, \"dim.size()\" must be 0." + "description": "If true, the number of dimensions in the shape is unknown.\nIf true, \"dim.size()\" must be 0." } }, "description": "Dimensions of a tensor." }, "TensorflowVariantTensorDataProto": { "type": "object", + "additionalProperties": false, "properties": { "type_name": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "description": "Name of the type of objects being serialized." }, "metadata": { "type": "string", + "pattern": "^.{1,2097152}", + "maxLength": 2097152, "format": "byte", "description": "Portions of the object that are not Tensors." }, "tensors": { "type": "array", + "maxItems": 2097152, "items": { "$ref": "#/components/schemas/TensorflowTensorProto" }, @@ -608,4 +709,4 @@ } } } -} \ No newline at end of file +}