{
  "factory": {
    "parent": "abstract-service",
    "description": "",
    "id": "service-components",
    "label": "service,rest",
    "type": "entaxy.runtime.service.component",
    "category": "",
    "isAbstract": true
  },
  "entaxy.runtime.service.component": {
  },
  "fields": {
  },
  "outputs": {
    "init": {
      "isDefault": true,
      "fields": {
      }
    },
    "schemaBasedService":{
    	"fields": {
		    "schemaUrl": {
		      "displayName": "Schema URL",
		      "type": "Url",
		      "group": "schema",
		      "required": true,
		      "@TYPEINFO": {
		        "resourceProvider": "schemas",
		        "filter": "*.yaml",
		        "target": "resource"
		      }
		    },
		    "displayServiceSchema": {
		      "displayName": "Public Service Schema",
		      "type": "Boolean",
		      "group": "schema",
		      "required": true,
		      "defaultValue": false
		    }
    	}
    },
    "schemaResourceBasedService": {
    	"fields": {
    		"@IMPORT": [
    			{
			        "sourceFactoryId": "#",
			        "location": "outputs.schemaBasedService.fields",
			        "prefix": ""
    			}
    		],
    		"schemaUrl": {
		      "@TYPEINFO": {
		        "resourceProvider": "schemas",
		        "filter": "*.schema",
		        "target": "resource"
		      }
    		},
		    "##publish": {
		    	"defaultValue": {
		    		"@INHERIT": {
		    			"resources": "append"
		    		},
		    		"resources":[
		    			{
		    				"@CALCULATED": {
		    					"lazy": false,
		    					"expression": "${properties.schemaUrl};runtime"
		    				} 
		    			}
		    		]
		    	}
		    }
    	}
    },
    "specificProtectedServiceComponents":{
    	"fields": {
			"connectorDispatchingBeans": {
				"type": "entaxy.runtime.service.component",
				"isRef": true,
				"required": true,
				"isHidden": true,
				"isRefByValueOnly": true,
				"@INTERNAL": true,
				"defaultValue": {
					"factoryId": "service-components",
					"type": "entaxy.runtime.service.component",
					"outputType": "connectorDispatchingBeans",
					"scope": "private",
					"properties": {
						"serviceId": {
							"@CALCULATED": {
								"lazy": false,
								"expression": "${#OWNER#.objectId}"
							}
						}
					} 
				}
			}
    	}
    },
    "connectorDispatchingBeans": {
    	"scopes": ["private"],
    	"fields": {
    		"serviceId": {
    			"type": "String"
    		}
    	},
		"config": {
			"configurable": false,
			"@SKIP_PUBLISH": {}
		}		
    }
  }
}