feat(import): preserve supported HTTP contracts
This commit is contained in:
1 parent
083974c27f
commit
f8ee7c9bfe
87 files changed
+7496
-534
No files matched your search
@@ -36,15 +36,53 @@
|
||||
"required": ["kind", "base_url", "method", "path_template"],
|
||||
"properties": {
|
||||
"kind": { "const": "rest" }, "base_url": { "type": "string", "minLength": 1, "maxLength": 4096 },
|
||||
"method": { "enum": ["get", "post", "put", "patch", "delete"] },
|
||||
"method": { "enum": ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "get", "post", "put", "patch", "delete"] },
|
||||
"path_template": { "type": "string", "minLength": 1, "maxLength": 4096 },
|
||||
"static_headers": { "$ref": "#/$defs/string_map" }
|
||||
"static_headers": { "$ref": "#/$defs/string_map" },
|
||||
"request_contract": { "$ref": "#/$defs/rest_request_contract" },
|
||||
"response_contract": { "type": "array", "maxItems": 4096, "items": { "$ref": "#/$defs/rest_response_descriptor" } },
|
||||
"multipart_field_mime_types": {
|
||||
"type": "object", "maxProperties": 64,
|
||||
"additionalProperties": {
|
||||
"type": "object", "maxProperties": 4096,
|
||||
"additionalProperties": { "type": "array", "maxItems": 64, "items": { "type": "string", "maxLength": 256 } }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rest_request_contract": {
|
||||
"type": "object", "additionalProperties": false,
|
||||
"required": ["version", "body_field", "body_required", "variants"],
|
||||
"properties": {
|
||||
"version": { "const": "1" },
|
||||
"body_field": { "type": "string", "minLength": 1, "maxLength": 256 },
|
||||
"selector_field": { "type": "string", "minLength": 1, "maxLength": 256 },
|
||||
"body_required": { "type": "boolean" },
|
||||
"variants": { "type": "array", "minItems": 1, "maxItems": 64, "items": { "$ref": "#/$defs/rest_request_descriptor" } }
|
||||
}
|
||||
},
|
||||
"rest_request_descriptor": {
|
||||
"type": "object", "additionalProperties": false,
|
||||
"required": ["media_type", "schema_variant"],
|
||||
"properties": {
|
||||
"media_type": { "type": "string", "minLength": 1, "maxLength": 256 },
|
||||
"schema_variant": { "type": "integer", "minimum": 0 }
|
||||
}
|
||||
},
|
||||
"rest_response_descriptor": {
|
||||
"type": "object", "additionalProperties": false,
|
||||
"required": ["status_code", "schema_variant"],
|
||||
"properties": {
|
||||
"status_code": { "type": "integer", "minimum": 200, "maximum": 299 },
|
||||
"media_type": { "type": "string", "minLength": 1, "maxLength": 256 },
|
||||
"schema_variant": { "type": "integer", "minimum": 0 }
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"type": "object", "additionalProperties": false, "required": ["type"],
|
||||
"properties": {
|
||||
"type": { "enum": ["object", "array", "string", "integer", "number", "boolean", "enum", "null", "oneof"] },
|
||||
"format": { "type": "string", "maxLength": 256 },
|
||||
"description": { "type": "string", "maxLength": 65536 }, "required": { "type": "boolean" }, "nullable": { "type": "boolean" },
|
||||
"default_value": {}, "fields": { "type": "object", "maxProperties": 4096, "additionalProperties": { "$ref": "#/$defs/schema" } },
|
||||
"items": { "$ref": "#/$defs/schema" }, "enum_values": { "type": "array", "maxItems": 4096, "items": { "type": "string", "maxLength": 65536 } },
|
||||
|
||||
Reference in new issue
Block a user