|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-04/schema", |
| 3 | + "title": "Microsoft ServiceHub Service", |
| 4 | + "type": "object", |
| 5 | + "properties": { |
| 6 | + "hostId": { |
| 7 | + "type": "string", |
| 8 | + "pattern": "^[^ ]*$", |
| 9 | + "description": "A non-empty value will cause this service to be activated on a dedicated host with this ID. All services with the same host / hostId combination will run in the same host process such that they may share global data. If unspecified or empty, a service will share its host process with other services that require the same host and also leave this field empty. If specified, the value must not have spaces in it." |
| 10 | + }, |
| 11 | + "hostGroupAllowed": { |
| 12 | + "type": "boolean", |
| 13 | + "description": "A value of 'true' will allow a client to specify a host group when requesting this service." |
| 14 | + }, |
| 15 | + "friendServices": { |
| 16 | + "type": "array", |
| 17 | + "description": "A set of ServiceHub service names whose AssemblyLoadContext will be used for resolving dependencies. These AssemblyLoadContexts will be queried in the order that appear, stopping when/if the assembly is successfully loaded. The additional AssemblyLoadContexts will only be searched if the assembly fails to resolve first by searching the directory that the service assembly is in. This property is only applicable to services running inside of .NET Core host processes." |
| 18 | + }, |
| 19 | + "entryPoint": { |
| 20 | + "type": "object", |
| 21 | + "description": "Host-specific parameters that describe how to activate this service.", |
| 22 | + "oneOf": [ |
| 23 | + { |
| 24 | + "type": "object", |
| 25 | + "required": ["assemblyPath", "fullClassName"], |
| 26 | + "properties": { |
| 27 | + "assemblyPath": { |
| 28 | + "type": "string", |
| 29 | + "description": "The path to the assembly that carries the service entrypoint class, relative to this file." |
| 30 | + }, |
| 31 | + "fullClassName": { |
| 32 | + "type": "string", |
| 33 | + "description": "The full name of the class to instantiate (that accepts a Stream in its constructor) when a new client requests this service." |
| 34 | + }, |
| 35 | + "appBasePath": { |
| 36 | + "type": "string", |
| 37 | + "description": "The path that the AppDomain hosting the service should be configured to consider the ApplicationBase, relative to this file. Only applicable for services running inside .NET Framework Host processes." |
| 38 | + }, |
| 39 | + "configPath": { |
| 40 | + "type": "string", |
| 41 | + "description": "The config file used to initialize the service's AppDomain. It may be omitted if the config file has the same name (+.config) as the service assembly, and resides in the same directory. It is also possible to have the service without the config file. Only applicable for services running inside .NET Framework host processes." |
| 42 | + }, |
| 43 | + "assemblySearchPathsConfig": { |
| 44 | + "type": "string", |
| 45 | + "description": "A path to a file that should contain an array of paths that are to be used to resolve assemblies if neither this service's AssemblyLoadContext, or one of its friends can resolve the assembly. The paths can either be relative to the location of this file, or absolute. This property is only applicable for services running inside .NET Core host processes." |
| 46 | + } |
| 47 | + }, |
| 48 | + "additionalProperties": false |
| 49 | + }, |
| 50 | + { |
| 51 | + "type": "object", |
| 52 | + "required": ["scriptPath", "constructorFunction"], |
| 53 | + "properties": { |
| 54 | + "scriptPath": { |
| 55 | + "type": "string", |
| 56 | + "description": "The path to the .js file to 'require', relative to this file." |
| 57 | + }, |
| 58 | + "constructorFunction": { |
| 59 | + "type": "string", |
| 60 | + "description": "The name of the constructor function to use (that accepts a stream) when a new client requests this service." |
| 61 | + } |
| 62 | + }, |
| 63 | + "additionalProperties": false |
| 64 | + } |
| 65 | + ] |
| 66 | + } |
| 67 | + }, |
| 68 | + "oneOf": [ |
| 69 | + { |
| 70 | + "type": "object", |
| 71 | + "required": ["hostConfiguration"], |
| 72 | + "properties": { |
| 73 | + "hostConfiguration": { |
| 74 | + "type": "string", |
| 75 | + "description": "Configuration information for how to start the service in a host process that it provides." |
| 76 | + } |
| 77 | + } |
| 78 | + }, |
| 79 | + { |
| 80 | + "type": "object", |
| 81 | + "required": ["host"], |
| 82 | + "properties": { |
| 83 | + "host": { |
| 84 | + "type": "string", |
| 85 | + "description": "The name of the host that should activate the service." |
| 86 | + } |
| 87 | + } |
| 88 | + } |
| 89 | + ] |
| 90 | +} |
0 commit comments