@open-resource-discovery/specification 1.9.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // AUTO-GENERATED definition files. Do not modify directly.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "http://json.schemastore.org/package",
3
+ "name": "@open-resource-discovery/specification",
4
+ "version": "1.9.11",
5
+ "description": "Open Resource Discovery (ORD) Specification",
6
+ "author": "SAP SE",
7
+ "license": "Apache-2.0",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/open-resource-discovery/specification.git"
11
+ },
12
+ "files": [
13
+ "dist/index.*",
14
+ "dist/types/",
15
+ "static/spec-v1/interfaces/*.json"
16
+ ],
17
+ "types": "dist/index.d.ts",
18
+ "main": "dist/index.js",
19
+ "scripts": {
20
+ "docusaurus": "docusaurus",
21
+ "build": "npm run build-docusaurus && touch ./build/.nojekyll",
22
+ "clean": "rimraf dist/ && rimraf build/ && rimraf .docusaurus/",
23
+ "build-docusaurus": "docusaurus build",
24
+ "serve": "docusaurus serve",
25
+ "start": "docusaurus start",
26
+ "deploy": "npm run build && gh-pages -d ./build"
27
+ },
28
+ "devDependencies": {
29
+ "@docusaurus/core": "3.7.0",
30
+ "@docusaurus/preset-classic": "3.7.0",
31
+ "@docusaurus/theme-mermaid": "3.7.0",
32
+ "@easyops-cn/docusaurus-search-local": "0.48.5",
33
+ "@mdx-js/react": "3.1.0",
34
+ "clsx": "2.1.1",
35
+ "prism-react-renderer": "2.4.1",
36
+ "react": "18.3.1",
37
+ "react-dom": "18.3.1"
38
+ },
39
+ "engines": {
40
+ "node": ">=20.0.0",
41
+ "npm": ">=10.0.0"
42
+ }
43
+ }
@@ -0,0 +1,163 @@
1
+ {
2
+ "description": "The ORD configuration response will indicate that ORD is available for the given host and how to proceed with the discovery.\n\nMost notably, the ORD configuration will tell an ORD consumer which ORD documents are available and where/how they can be accessed.\n\nThe configuration endpoint is a [Well-Known URI](https://tools.ietf.org/html/rfc8615#section-3) discovery mechanism.",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$id": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Configuration.schema.json#",
5
+ "definitions": {
6
+ "OpenResourceDiscoveryV1": {
7
+ "type": "object",
8
+ "title": "ORD V1 Support",
9
+ "description": "The existence of this version indicates that Open Resource Discovery is supported in Version 1.x",
10
+ "properties": {
11
+ "documents": {
12
+ "type": "array",
13
+ "description": "List of all ORD documents that can be retrieved.\n\nWhile it is possible to describe everything in one big ORD document, for bigger services/use cases it might be preferable to split the information into multiple documents.\n\nFor more details how to implement this correctly, please refer to the [ORD configuration endpoint](../index.md#ord-configuration-endpoint) section and the [considerations on the granularity of ORD documents](../index.md#considerations-on-the-granularity-of-ord-documents).",
14
+ "items": {
15
+ "$ref": "#/definitions/V1DocumentDescription"
16
+ }
17
+ }
18
+ },
19
+ "additionalProperties": false
20
+ },
21
+ "V1DocumentDescription": {
22
+ "type": "object",
23
+ "title": "ORD V1 Document Description",
24
+ "description": "Describes an [ORD Document](../index.md#ord-document) that is available for pull transport consumption.",
25
+ "properties": {
26
+ "url": {
27
+ "type": "string",
28
+ "format": "uri-reference",
29
+ "description": "URL or relative URL to the ORD document (provided by an ORD document endpoint).\n\nIt is RECOMMENDED to provide a relative URL (to `baseUrl`).\nIf a `baseUrl` is given, the relative URLs will be resolved with it.\n\nIf the URL is not relative to the system providing this information or no well-known URI is used,\neither the baseUrl or a full URL to the document MUST be provided.",
30
+ "examples": [
31
+ "/open-resource-discovery/v1/documents/example1",
32
+ "../../documents/example1",
33
+ "https://example.com/open-resource-discovery/v1/documents/example1"
34
+ ]
35
+ },
36
+ "systemInstanceAware": {
37
+ "type": "boolean",
38
+ "description": "Whether the information in the ORD document is **system instance aware**.\n\nThis is the case when the provided ORD document potentially differs between **system instances**.\nPlease note that if a system does not support multi-tenancy, most likely each system instance has its own\nURL and different system instances could even be deployed in a different state (version).\nIf those conditions apply, `systemInstanceAware` MUST be set to true.\n\nAn ORD aggregator that represents a system instance aware perspective MUST fetch a system instance aware ORD document,\nnot just once per system type but once per **system instance**.\n\nPlease note that you can define system instance awareness also on the level of an ORD resource.\nIt is even possible and valid to have an ORD document that is NOT system instance aware to contain resources that are.\nThis can be the case because the resource is described in separate resource definition formats which would change,\nwhile the ORD document itself would not change (the links to the resource definition files stay the same).\n\nIf some ORD information is **system instance aware** and some is not,\nwe RECOMMEND to split the information into separate documents and mark their system instance awareness accordingly.",
39
+ "default": false,
40
+ "examples": [
41
+ true
42
+ ]
43
+ },
44
+ "accessStrategies": {
45
+ "type": "array",
46
+ "description": "List of supported access strategies for retrieving the metadata from the ORD provider.\n\nAn ORD Consumer/ORD Aggregator MAY freely choose any of the listed strategies.",
47
+ "items": {
48
+ "$ref": "#/definitions/AccessStrategy"
49
+ },
50
+ "minItems": 1
51
+ }
52
+ },
53
+ "additionalProperties": false,
54
+ "required": [
55
+ "url",
56
+ "accessStrategies"
57
+ ]
58
+ },
59
+ "AccessStrategy": {
60
+ "type": "object",
61
+ "title": "Access Strategy",
62
+ "description": "Defines the [access strategy](../../spec-extensions/access-strategies/) for accessing the ORD documents from the ORD provider.",
63
+ "properties": {
64
+ "type": {
65
+ "type": "string",
66
+ "description": "Defines the authentication/authorization strategy through which the referenced ORD Documents can be accessed.",
67
+ "oneOf": [
68
+ {
69
+ "const": "open",
70
+ "description": "The resource definitions are openly accessible and not protected via authentication or authorization.\nPlease find a more detailed documentation [here](../../spec-extensions/access-strategies/open)."
71
+ },
72
+ {
73
+ "const": "sap:oauth-client-credentials:v1",
74
+ "description": "The ORD information are accessible via OAuth 2.0 client credentials flow as standardized within SAP.\nPlease find a more detailed documentation [here](../../spec-extensions/access-strategies/sap-oauth-client-credentials-v1)."
75
+ },
76
+ {
77
+ "const": "sap:cmp-mtls:v1",
78
+ "description": "The ORD information are accessible via Unified Customer Landscape's client certificate.\nPlease find a more detailed documentation [here](../../spec-extensions/access-strategies/sap-cmp-mtls-v1)."
79
+ },
80
+ {
81
+ "const": "sap.businesshub:basic-auth:v1",
82
+ "description": "The ORD information are accessible for SAP Business Accelerator Hub via Basic Auth strategy.\nPlease find a more detailed documentation [here](../../spec-extensions/access-strategies/sap-businesshub-basic-v1)."
83
+ },
84
+ {
85
+ "const": "custom",
86
+ "description": "If chosen, `customType` MUST be provided.\nIf chosen, `customDescription` SHOULD be provided."
87
+ }
88
+ ],
89
+ "examples": [
90
+ "open"
91
+ ]
92
+ },
93
+ "customType": {
94
+ "type": "string",
95
+ "description": "If the fixed `type` enum values need to be extended, an arbitrary `customType` can be provided.\n\nMUST be a valid [Specification ID](../index.md#specification-id).\n\nMUST only be provided if `type` is set to `custom`.",
96
+ "pattern": "^([a-z0-9]+(?:[.][a-z0-9]+)*):([a-zA-Z0-9._\\-]+):v([0-9]+)$",
97
+ "maxLength": 255,
98
+ "examples": [
99
+ "sap.xref:open-local-tenant-id:v1"
100
+ ]
101
+ },
102
+ "customDescription": {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "description": "Human-readable description about how the access is set up, notated in [CommonMark](https://spec.commonmark.org/) (Markdown).\n\nMUST only be provided if `type` is set to `custom`.",
106
+ "examples": [
107
+ "To set up the access to OData APIs, please refer to the [SAP Cloud for Customer OData API](https://help.sap.com/viewer/1364b70b9cbb417ea5e2d80e966d4f49/CLOUD/en-US) help pages.\""
108
+ ]
109
+ }
110
+ },
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "type"
114
+ ],
115
+ "examples": [
116
+ {
117
+ "type": "open"
118
+ },
119
+ {
120
+ "type": "custom",
121
+ "customType": "sap.xref:open-local-tenant-id:v1",
122
+ "customDescription": "Custom description how to use custom access strategy"
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ "title": "ORD Configuration",
128
+ "type": "object",
129
+ "properties": {
130
+ "$schema": {
131
+ "type": "string",
132
+ "format": "uri-reference",
133
+ "description": "Optional URL to the ORD document schema (defined as JSON Schema).\nIf given, this enables code intelligence and validation in supported editors (like VSCode) and tools.",
134
+ "anyOf": [
135
+ {
136
+ "type": "string",
137
+ "format": "uri-reference"
138
+ },
139
+ {
140
+ "const": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Configuration.schema.json#"
141
+ }
142
+ ]
143
+ },
144
+ "baseUrl": {
145
+ "type": "string",
146
+ "format": "uri",
147
+ "description": "Optional [base URL](../index.md#def-base-url) that can be used to resolve the relative URLs to the ORD Documents.\n\nThe `baseUrl` MUST not contain a leading slash.\n\nIf you do not provide this property, the base URL is assumed to be the URL of the config endpoint without `/.well-known/open-resource-discovery` suffix.\nThis implies that either a `baseUrl` or only absolute URLs MUST be provided when no standardized well-known URI is used.\nIf both a `baseUrl` and a well-known URI is provided, the explicit `baseUrl` takes precedence.",
148
+ "pattern": "^http[s]?:\\/\\/[^:\\/\\s]+\\.[^:\\/\\s\\.]+(:\\d+)?(\\/[a-zA-Z0-9-\\._~]+)*$",
149
+ "examples": [
150
+ "https://example-sap-system.com",
151
+ "https://sub.foo.bar.com",
152
+ "https://sub.foo.bar.com/api/v1"
153
+ ]
154
+ },
155
+ "openResourceDiscoveryV1": {
156
+ "$ref": "#/definitions/OpenResourceDiscoveryV1"
157
+ }
158
+ },
159
+ "additionalProperties": false,
160
+ "required": [
161
+ "openResourceDiscoveryV1"
162
+ ]
163
+ }
@@ -0,0 +1,163 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Configuration.schema.json#",
4
+ "description": "The ORD configuration response will indicate that ORD is available for the given host and how to proceed with the discovery.\n\nMost notably, the ORD configuration will tell an ORD consumer which ORD documents are available and where/how they can be accessed.\n\nThe configuration endpoint is a [Well-Known URI](https://tools.ietf.org/html/rfc8615#section-3) discovery mechanism.",
5
+ "definitions": {
6
+ "OpenResourceDiscoveryV1": {
7
+ "type": "object",
8
+ "title": "ORD V1 Support",
9
+ "description": "The existence of this version indicates that Open Resource Discovery is supported in Version 1.x",
10
+ "properties": {
11
+ "documents": {
12
+ "type": "array",
13
+ "description": "List of all ORD documents that can be retrieved.\n\nWhile it is possible to describe everything in one big ORD document, for bigger services/use cases it might be preferable to split the information into multiple documents.\n\nFor more details how to implement this correctly, please refer to the [ORD configuration endpoint](../index.md#ord-configuration-endpoint) section and the [considerations on the granularity of ORD documents](../index.md#considerations-on-the-granularity-of-ord-documents).",
14
+ "items": {
15
+ "$ref": "#/definitions/V1DocumentDescription"
16
+ }
17
+ }
18
+ },
19
+ "additionalProperties": false
20
+ },
21
+ "V1DocumentDescription": {
22
+ "type": "object",
23
+ "title": "ORD V1 Document Description",
24
+ "description": "Describes an [ORD Document](../index.md#ord-document) that is available for pull transport consumption.",
25
+ "properties": {
26
+ "url": {
27
+ "type": "string",
28
+ "format": "uri-reference",
29
+ "description": "URL or relative URL to the ORD document (provided by an ORD document endpoint).\n\nIt is RECOMMENDED to provide a relative URL (to `baseUrl`).\nIf a `baseUrl` is given, the relative URLs will be resolved with it.\n\nIf the URL is not relative to the system providing this information or no well-known URI is used,\neither the baseUrl or a full URL to the document MUST be provided.",
30
+ "examples": [
31
+ "/open-resource-discovery/v1/documents/example1",
32
+ "../../documents/example1",
33
+ "https://example.com/open-resource-discovery/v1/documents/example1"
34
+ ]
35
+ },
36
+ "systemInstanceAware": {
37
+ "type": "boolean",
38
+ "description": "Whether the information in the ORD document is **system instance aware**.\n\nThis is the case when the provided ORD document potentially differs between **system instances**.\nPlease note that if a system does not support multi-tenancy, most likely each system instance has its own\nURL and different system instances could even be deployed in a different state (version).\nIf those conditions apply, `systemInstanceAware` MUST be set to true.\n\nAn ORD aggregator that represents a system instance aware perspective MUST fetch a system instance aware ORD document,\nnot just once per system type but once per **system instance**.\n\nPlease note that you can define system instance awareness also on the level of an ORD resource.\nIt is even possible and valid to have an ORD document that is NOT system instance aware to contain resources that are.\nThis can be the case because the resource is described in separate resource definition formats which would change,\nwhile the ORD document itself would not change (the links to the resource definition files stay the same).\n\nIf some ORD information is **system instance aware** and some is not,\nwe RECOMMEND to split the information into separate documents and mark their system instance awareness accordingly.",
39
+ "default": false,
40
+ "examples": [
41
+ true
42
+ ]
43
+ },
44
+ "accessStrategies": {
45
+ "type": "array",
46
+ "description": "List of supported access strategies for retrieving the metadata from the ORD provider.\n\nAn ORD Consumer/ORD Aggregator MAY freely choose any of the listed strategies.",
47
+ "items": {
48
+ "$ref": "#/definitions/AccessStrategy"
49
+ },
50
+ "minItems": 1
51
+ }
52
+ },
53
+ "additionalProperties": false,
54
+ "required": [
55
+ "url",
56
+ "accessStrategies"
57
+ ]
58
+ },
59
+ "AccessStrategy": {
60
+ "type": "object",
61
+ "title": "Access Strategy",
62
+ "description": "Defines the [access strategy](../../spec-extensions/access-strategies/) for accessing the ORD documents from the ORD provider.",
63
+ "properties": {
64
+ "type": {
65
+ "type": "string",
66
+ "description": "Defines the authentication/authorization strategy through which the referenced ORD Documents can be accessed.",
67
+ "oneOf": [
68
+ {
69
+ "const": "open",
70
+ "description": "The resource definitions are openly accessible and not protected via authentication or authorization.\nPlease find a more detailed documentation [here](../../spec-extensions/access-strategies/open)."
71
+ },
72
+ {
73
+ "const": "sap:oauth-client-credentials:v1",
74
+ "description": "The ORD information are accessible via OAuth 2.0 client credentials flow as standardized within SAP.\nPlease find a more detailed documentation [here](../../spec-extensions/access-strategies/sap-oauth-client-credentials-v1)."
75
+ },
76
+ {
77
+ "const": "sap:cmp-mtls:v1",
78
+ "description": "The ORD information are accessible via Unified Customer Landscape's client certificate.\nPlease find a more detailed documentation [here](../../spec-extensions/access-strategies/sap-cmp-mtls-v1)."
79
+ },
80
+ {
81
+ "const": "sap.businesshub:basic-auth:v1",
82
+ "description": "The ORD information are accessible for SAP Business Accelerator Hub via Basic Auth strategy.\nPlease find a more detailed documentation [here](../../spec-extensions/access-strategies/sap-businesshub-basic-v1)."
83
+ },
84
+ {
85
+ "const": "custom",
86
+ "description": "If chosen, `customType` MUST be provided.\nIf chosen, `customDescription` SHOULD be provided."
87
+ }
88
+ ],
89
+ "examples": [
90
+ "open"
91
+ ]
92
+ },
93
+ "customType": {
94
+ "type": "string",
95
+ "description": "If the fixed `type` enum values need to be extended, an arbitrary `customType` can be provided.\n\nMUST be a valid [Specification ID](../index.md#specification-id).\n\nMUST only be provided if `type` is set to `custom`.",
96
+ "pattern": "^([a-z0-9]+(?:[.][a-z0-9]+)*):([a-zA-Z0-9._\\-]+):v([0-9]+)$",
97
+ "maxLength": 255,
98
+ "examples": [
99
+ "sap.xref:open-local-tenant-id:v1"
100
+ ]
101
+ },
102
+ "customDescription": {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "description": "Human-readable description about how the access is set up, notated in [CommonMark](https://spec.commonmark.org/) (Markdown).\n\nMUST only be provided if `type` is set to `custom`.",
106
+ "examples": [
107
+ "To set up the access to OData APIs, please refer to the [SAP Cloud for Customer OData API](https://help.sap.com/viewer/1364b70b9cbb417ea5e2d80e966d4f49/CLOUD/en-US) help pages.\""
108
+ ]
109
+ }
110
+ },
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "type"
114
+ ],
115
+ "examples": [
116
+ {
117
+ "type": "open"
118
+ },
119
+ {
120
+ "type": "custom",
121
+ "customType": "sap.xref:open-local-tenant-id:v1",
122
+ "customDescription": "Custom description how to use custom access strategy"
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ "title": "ORD Configuration",
128
+ "type": "object",
129
+ "properties": {
130
+ "$schema": {
131
+ "type": "string",
132
+ "format": "uri-reference",
133
+ "description": "Optional URL to the ORD document schema (defined as JSON Schema).\nIf given, this enables code intelligence and validation in supported editors (like VSCode) and tools.",
134
+ "anyOf": [
135
+ {
136
+ "type": "string",
137
+ "format": "uri-reference"
138
+ },
139
+ {
140
+ "const": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Configuration.schema.json#"
141
+ }
142
+ ]
143
+ },
144
+ "baseUrl": {
145
+ "type": "string",
146
+ "format": "uri",
147
+ "description": "Optional [base URL](../index.md#def-base-url) that can be used to resolve the relative URLs to the ORD Documents.\n\nThe `baseUrl` MUST not contain a leading slash.\n\nIf you do not provide this property, the base URL is assumed to be the URL of the config endpoint without `/.well-known/open-resource-discovery` suffix.\nThis implies that either a `baseUrl` or only absolute URLs MUST be provided when no standardized well-known URI is used.\nIf both a `baseUrl` and a well-known URI is provided, the explicit `baseUrl` takes precedence.",
148
+ "pattern": "^http[s]?:\\/\\/[^:\\/\\s]+\\.[^:\\/\\s\\.]+(:\\d+)?(\\/[a-zA-Z0-9-\\._~]+)*$",
149
+ "examples": [
150
+ "https://example-sap-system.com",
151
+ "https://sub.foo.bar.com",
152
+ "https://sub.foo.bar.com/api/v1"
153
+ ]
154
+ },
155
+ "openResourceDiscoveryV1": {
156
+ "$ref": "#/definitions/OpenResourceDiscoveryV1"
157
+ }
158
+ },
159
+ "additionalProperties": false,
160
+ "required": [
161
+ "openResourceDiscoveryV1"
162
+ ]
163
+ }