From 6fd88c37a549a9ed982d514b7dc5be8d6337b3e3 Mon Sep 17 00:00:00 2001 From: Tejaswini Duggaraju Date: Mon, 22 Nov 2021 12:07:18 -0800 Subject: [PATCH] Updated the extensions spec with the new discover routes Signed-off-by: Tejaswini Duggaraju Signed-off-by: Vincent Batts --- ext/README.md | 10 +++++----- ext/ext.md | 12 +++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ext/README.md b/ext/README.md index fd4b24a8..93fb5595 100644 --- a/ext/README.md +++ b/ext/README.md @@ -10,16 +10,16 @@ be emulated for all extensions. ## Table -_notice_: All new `./ext/ext-$name.md` docs MUST be added to this table. +_notice_: All new `./ext/ext-$ns-$name.md` docs MUST be added to this table. -| `$name` | Summary | +| `$ns-$name` | Summary | |:------------------------:|:----------------------------------------------------:| | [ext](./ext.md) | Extensions discovering extensions on registry server | ## Name Extension names MUST be unique. Extensions are specified by -`namespace` aligning with the project, followed by the `extension` provided by the project and last by by the `component`. This constitues the URI segments +`namespace` aligning with the project, followed by the `extension` provided by the project and last by by the `component`. This constitutes the URI segments of the extension endpoint. Additional options may be passed as parameters to the endpoint. ```http @@ -49,8 +49,8 @@ GET /v2//_//[?=&...] ## Filename -Extention definitions SHOULD be placed under `./ext/`. Extension files -SHOULD follow the `ext-$name.md`. Refer [ext.md](./ext.md) for more details. +Extension definitions SHOULD be placed under `./ext/`. Extension files +SHOULD follow the `ext-$ns-$name.md`. Refer [ext.md](./ext.md) for more details. ## Detail diff --git a/ext/ext.md b/ext/ext.md index 3c310b76..a1347de1 100644 --- a/ext/ext.md +++ b/ext/ext.md @@ -2,7 +2,7 @@ ## Summary -This base extension is used to discover and return an array of extensions. +This base extension namespace is used to discover and return an array of extensions. ## Reference Explanation @@ -12,13 +12,13 @@ extensions. Registry level extensions may be discovered with a standard GET as follows. ```HTTP - GET /v2/_ext/ + GET /v2/_ext/discover ``` Repository level extensions may be discovered with a standard GET as follows. ```HTTP - GET /v2/{name}/_ext/ + GET /v2/{name}/_ext/discover ``` The base extension returns an array of supported extensions with details of the @@ -31,14 +31,16 @@ Content-Type: application/json { "extensions: [ - "_//", + { + "name": "_//" + }, ] } ``` ### *Extensions* Property Descriptions -- **`extensions`** *array of strings* +- **`extensions`** *array of extension objects with properties like `name`* This REQUIRED property contains a list of supported extension endpoints.