diff --git a/CHANGELOG.md b/CHANGELOG.md index 291e4d76..e68b77fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ For a roadmap including expected timeline, please refer to [ROADMAP.md](./ROADMA ## [unreleased] +### Added + +- Added `namespaces` property to ORD Configuration to support namespace document references + - This allows ORD providers to specify where namespace definitions (as used in ORD IDs) can be retrieved + ## [1.14.0] ### Added diff --git a/examples/configuration/configuration-1.json b/examples/configuration/configuration-1.json index 072b2126..acc7d361 100644 --- a/examples/configuration/configuration-1.json +++ b/examples/configuration/configuration-1.json @@ -35,6 +35,16 @@ ] } ], + "namespaces": [ + { + "url": "/namespaces.json", + "accessStrategies": [ + { + "type": "open" + } + ] + } + ], "capabilities": { "selector": true } diff --git a/spec/v1/Configuration.schema.yaml b/spec/v1/Configuration.schema.yaml index 42fcf712..c48fcc46 100644 --- a/spec/v1/Configuration.schema.yaml +++ b/spec/v1/Configuration.schema.yaml @@ -64,6 +64,15 @@ definitions: items: "$ref": "#/definitions/V1DocumentDescription" + namespaces: + type: array + description: |- + List of namespace documents that can be retrieved. + + TODO: Link to JSON Schema that defines the namespace JSON format. + items: + "$ref": "#/definitions/V1NamespaceDescription" + capabilities: "$ref": "#/definitions/V1Capabilities" @@ -180,6 +189,49 @@ definitions: - url - accessStrategies + ############################################################################################################ + + V1NamespaceDescription: + type: object + title: Ord V1 Namespace Description + description: |- + Describes a namespace document that is available for retrieval. + x-ums-type: "ignore" + properties: + url: + type: string + format: uri-reference + description: |- + URL or relative URL to the namespace document. + + It is RECOMMENDED to provide a relative URL (to `baseUrl`). + If a `baseUrl` is given, the relative URLs will be resolved with it. + + If the URL is not relative to the system providing this information or no well-known URI is used, + either the baseUrl or a full URL to the document MUST be provided. + examples: + - "/namespaces.json" + - "../../namespaces.json" + - "https://example.com/namespaces.json" + + accessStrategies: + type: array + description: |- + List of supported access strategies for retrieving the namespace document from the ORD provider. + + An ORD Consumer/ORD Aggregator MAY freely choose any of the listed strategies. + + items: + $ref: "#/definitions/AccessStrategy" + minItems: 1 + + additionalProperties: false + required: + - url + - accessStrategies + + ############################################################################################################ + #/definitions/V1Capabilities" V1Capabilities: type: object diff --git a/src/generated/spec/v1/types/Configuration.ts b/src/generated/spec/v1/types/Configuration.ts index a546bc3c..72492d36 100644 --- a/src/generated/spec/v1/types/Configuration.ts +++ b/src/generated/spec/v1/types/Configuration.ts @@ -39,6 +39,12 @@ export interface OrdV1Support { * For 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). */ documents?: OrdV1DocumentDescription[]; + /** + * List of namespace documents that can be retrieved. + * + * TODO: Link to JSON Schema that defines the namespace JSON format. + */ + namespaces?: OrdV1NamespaceDescription[]; capabilities?: OrdV1Capabilities; } /** @@ -111,6 +117,29 @@ export interface OrdV1DocumentAccessStrategy { */ customDescription?: string; } +/** + * Describes a namespace document that is available for retrieval. + */ +export interface OrdV1NamespaceDescription { + /** + * URL or relative URL to the namespace document. + * + * It is RECOMMENDED to provide a relative URL (to `baseUrl`). + * If a `baseUrl` is given, the relative URLs will be resolved with it. + * + * If the URL is not relative to the system providing this information or no well-known URI is used, + * either the baseUrl or a full URL to the document MUST be provided. + */ + url: string; + /** + * List of supported access strategies for retrieving the namespace document from the ORD provider. + * + * An ORD Consumer/ORD Aggregator MAY freely choose any of the listed strategies. + * + * @minItems 1 + */ + accessStrategies: [OrdV1DocumentAccessStrategy, ...OrdV1DocumentAccessStrategy[]]; +} /** * List of capabilities that are supported by the ORD provider. */