From a42d558a0cf29ef6b8e99d346cc9ec9eeb2c6913 Mon Sep 17 00:00:00 2001 From: Paul Lan Date: Mon, 1 Jul 2024 14:28:09 -0500 Subject: [PATCH] Remove schema sync --- schemas/actions_v01.json | 28 +----- schemas/connection_v01.json | 91 +------------------ schemas/info_v01.json | 5 -- schemas/mainADD_v01.json | 46 ---------- schemas/schemas_v01.json | 171 +++++++++--------------------------- 5 files changed, 47 insertions(+), 294 deletions(-) diff --git a/schemas/actions_v01.json b/schemas/actions_v01.json index 0771115..e6dfec5 100644 --- a/schemas/actions_v01.json +++ b/schemas/actions_v01.json @@ -64,29 +64,7 @@ "maxLength": 100 } }, - "additionalProperties": false, - "allOf": [ - { - "if": { - "required": [ "input" ] - }, - "then": { - "not": { - "required": [ "$refOpenapi" ] - } - } - }, - { - "if": { - "required": [ "output" ] - }, - "then": { - "not": { - "required": [ "$refOpenapi" ] - } - } - } - ] + "additionalProperties": false }, "InputOutput": { "oneOf": [ @@ -368,8 +346,7 @@ "^[a-zA-Z0-9\\.\\-_]+$": { "$ref": "#/definitions/Dependency" } - }, - "minProperties": 1 + } }, "Dependency": { "type": "object", @@ -384,7 +361,6 @@ "uniqueItems": true } }, - "required": [ "values" ], "additionalProperties": false } } diff --git a/schemas/connection_v01.json b/schemas/connection_v01.json index 76538ad..a7d99bb 100644 --- a/schemas/connection_v01.json +++ b/schemas/connection_v01.json @@ -21,9 +21,6 @@ ], "minLength": 6, "maxLength": 256 - }, - "connectionInstance": { - "$ref": "#/definitions/ConnectionInstance" } }, "required": [ @@ -266,7 +263,7 @@ "ADD_OAUTH_CLIENT_CREDENTIALS", "OAUTH2.0_CLIENT_CREDENTIALS", "ADD_OAUTH_RESOURCE_OWNER_PASSWORD_CREDENTIALS", "OAUTH2.0_RESOURCE_OWNER_PASSWORD_CREDENTIALS", "AWS_SIGNATURE_VERSION4","CAREAWARE_MILLENNIUM_OAUTH_USER_FLOW","CAREAWARE_MILLENNIUM_OAUTH_SYSTEM_FLOW", - "JWT_CLIENT_CREDENTIALS_ASSERTION_FOR_OAUTH","JWT_USER_ASSERTION_FOR_OAUTH","OCI_SERVICE_INVOCATION" + "JWT_CLIENT_CREDENTIALS_ASSERTION_FOR_OAUTH","JWT_USER_ASSERTION_FOR_OAUTH" ] } }, @@ -609,22 +606,6 @@ } } } - }, - { - "if": { - "properties": { - "policy": { - "const": "OCI_SERVICE_INVOCATION" - } - } - }, - "then": { - "not": { - "required": [ - "securityProperties" - ] - } - } } ] } @@ -1900,7 +1881,7 @@ "ADD_OAUTH_CLIENT_CREDENTIALS", "OAUTH2.0_CLIENT_CREDENTIALS", "ADD_OAUTH_RESOURCE_OWNER_PASSWORD_CREDENTIALS", "OAUTH2.0_RESOURCE_OWNER_PASSWORD_CREDENTIALS", "AWS_SIGNATURE_VERSION4", "CAREAWARE_MILLENNIUM_OAUTH_USER_FLOW","CAREAWARE_MILLENNIUM_OAUTH_SYSTEM_FLOW", - "JWT_CLIENT_CREDENTIALS_ASSERTION_FOR_OAUTH","JWT_USER_ASSERTION_FOR_OAUTH","OCI_SERVICE_INVOCATION" + "JWT_CLIENT_CREDENTIALS_ASSERTION_FOR_OAUTH","JWT_USER_ASSERTION_FOR_OAUTH" ] } }, @@ -2789,74 +2770,6 @@ "additionalProperties": false }, "additionalItems": false - }, - "ConnectionInstance": { - "title": "Connection Instance", - "description": "Pre-defined connection instance for system adapter.", - "type": "object", - "required": [ - "id", - "policy" - ], - "properties": { - "id": { - "title": "Adapter ID", - "description": "The 'id' field identifies the adapter universally. The 'id' MUST have a namespace prefix separated from an identifier with a colon. The format is ':'.", - "type": "string", - "pattern": "^[A-Z][A-Z0-9_]{10,32}$" - }, - "policy": { - "description": "policy points to the name of the pre-defined managed security policy being used. policy should not be used in case of nonManaged security policies.", - "type": "string", - "enum": [ - "OCI_SERVICE_INVOCATION", - "OCI_SIGNATURE_VERSION1", - "NONE" - ] - }, - "instanceProperties": { - "type": "object", - "patternProperties": { - "^[a-zA-Z][a-zA-Z0-9\\-_]{0,100}$": { - "type": "string", - "maxLength": 1000 - } - } - }, - "attachments": { - "type": "array", - "minItems": 0, - "maxItems": 10, - "uniqueItems": true, - "items": { - "type": "object", - "required": [ - "attachmentName", - "propertyName", - "content" - ], - "properties": { - "attachmentName": { - "type": "string", - "description":"attachment name.", - "maxLength": 100 - }, - "propertyName": { - "type": "string", - "description":"property name.", - "maxLength": 100 - }, - "content": { - "type": "string", - "description":"attachment content.", - "maxLength": 10000 - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false } } } diff --git a/schemas/info_v01.json b/schemas/info_v01.json index 9e32536..d394107 100644 --- a/schemas/info_v01.json +++ b/schemas/info_v01.json @@ -61,11 +61,6 @@ "1.0" ] }, - "systemAdapter": { - "type": "boolean", - "title": "System Adapter", - "description": "This setting allows the adapter runs as a system adapter." - }, "categories": { "title": "Categories", "description": "The categories that applies to the adapter's capabilities, typically associated with the third party system for which the adapter provides integration functionality.", diff --git a/schemas/mainADD_v01.json b/schemas/mainADD_v01.json index 96e1252..2ecd391 100644 --- a/schemas/mainADD_v01.json +++ b/schemas/mainADD_v01.json @@ -75,52 +75,6 @@ } } } - }, - { - "$comment": "connection instance is required for system connection.", - "if": { - "required": [ "info" ], - "properties": { - "info": { - "required": [ "systemAdapter" ], - "properties": { - "systemAdapter": { - "const": true - } - } - } - } - }, - "then": { - "properties": { - "connection": { - "required": [ "connectionInstance" ] - } - } - } - }, - { - "$comment": "connection instance should not present for non system connection.", - "if": { - "properties": { - "info": { - "properties": { - "systemAdapter": { - "const": false - } - } - } - } - }, - "then": { - "not": { - "properties": { - "connection": { - "required": [ "connectionInstance" ] - } - } - } - } } ], "definitions": { diff --git a/schemas/schemas_v01.json b/schemas/schemas_v01.json index 3b7f7fd..9943c0d 100644 --- a/schemas/schemas_v01.json +++ b/schemas/schemas_v01.json @@ -14,16 +14,6 @@ "maxProperties": 600, "definitions": { "Schema": { - "oneOf": [ - { - "$ref": "#/definitions/BasicSchema" - }, - { - "$ref": "#/definitions/PolymorphicSchema" - } - ] - }, - "BasicSchema": { "type": "object", "properties": { "type": { @@ -38,12 +28,10 @@ ] }, "title": { - "type": "string", - "maxLength": 100 + "type": "string" }, "description": { - "type": "string", - "maxLength": 1000 + "type": "string" }, "format": { "type": "string", @@ -65,77 +53,70 @@ "items": { "oneOf": [ { - "$ref": "#/definitions/BasicSchema" + "$ref": "#/definitions/Schema" }, { "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/PolymorphicSchema" } ] }, - "properties": { - "type": "object", - "additionalProperties": { + "allOf": { + "type": "array", + "items": { "oneOf": [ { - "$ref": "#/definitions/BasicSchema" + "$ref": "#/definitions/Schema" }, { "$ref": "#/definitions/Reference" + } + ] + } + }, + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" }, { - "$ref": "#/definitions/PolymorphicSchema" + "$ref": "#/definitions/Reference" } ] - }, - "minProperties": 1 - } - }, - "required": [ - "type" - ], - "additionalProperties": false, - "allOf": [ - { - "if": { - "type": "object", - "properties": { - "type": { - "const": "array" + } + }, + "anyOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" } - }, - "required": ["type"] - }, - "then": { - "required": [ - "items" ] } }, - { - "if": { - "type": "object", - "properties": { - "type": { - "const": "object" - } - }, - "required": ["type"] - }, - "then": { - "properties": { - "properties": { - "minProperties": 1 + "discriminator": { + "$ref": "#/definitions/Discriminator" + }, + "properties": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Schema" + }, + { + "$ref": "#/definitions/Reference" } - }, - "required": [ - "properties" ] } } - ] + }, + "additionalProperties": false }, "Reference": { "type": "object", @@ -160,16 +141,6 @@ "propertyName": { "description":"The name of the property in the payload that will hold the discriminator value.", "type": "string" - }, - "mapping": { - "description":"An object to hold mappings between payload values and schema names or references.", - "type": "object", - "patternProperties": { - "^[a-zA-Z][a-zA-Z0-9\\.\\-_]{0,100}$": { - "type": "string", - "pattern": "#/schemas/[a-zA-Z0-9\\.\\-_]{0,100}$" - } - } } }, "additionalProperties": false @@ -187,62 +158,6 @@ } }, "additionalProperties": false - }, - "PolymorphicSchema": { - "type": "object", - "properties": { - "allOf": { - "type": "array", - "items": { - "$ref": "#/definitions/Reference" - } - }, - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/Reference" - } - }, - "anyOf": { - "type": "array", - "items": { - "$ref": "#/definitions/Reference" - } - }, - "discriminator": { - "$ref": "#/definitions/Discriminator" - } - }, - "additionalProperties": false, - "oneOf": [ - { - "properties": { - "oneOf": { - }, - "discriminator": { - } - }, - "additionalProperties": false - }, - { - "properties": { - "anyOf": { - }, - "discriminator": { - } - }, - "additionalProperties": false - }, - { - "properties": { - "allOf": { - }, - "discriminator": { - } - }, - "additionalProperties": false - } - ] } } } \ No newline at end of file