Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update link to ORD specification #132

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

## About this project

This plugin adds support for the [Open Resource Discovery](https://sap.github.io/open-resource-discovery/) (ORD) protocol for CAP based applications.
This plugin adds support for the [Open Resource Discovery](https://open-resource-discovery.github.io/specification/) (ORD) protocol for CAP based applications.
When you add the ORD plugin, your application gains a single entry point, which allows to discover and gather machine-readable information or metadata about the application.
You can use this information to construct a static metadata catalog or to perform a detailed runtime inspection of your actual system instances / system landscapes.

For more information, have a look at the [Open Resource Discovery](https://sap.github.io/open-resource-discovery/) page.
For more information, have a look at the [Open Resource Discovery](https://open-resource-discovery.github.io/specification/) page.

> ⚠ By installing this plugin, the metadata describing your CAP application will be made openly accessible. If you want to secure your CAP application's metadata, configure `basic` authentication by setting the environment variables or updating the `.cdsrc.json` file. The plugin prioritizes environment variables, then checks `.cdsrc.json`. If neither is configured, metadata remains publicly accessible.

Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/mockedCsn.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Tests for ORD document generated out of mocked csn files Tests for ORD document when .cdsrc.json has no \`ord\` property Successfully create ORD Documents with no \`ord\` in .cdsrc.json 1`] = `
{
"$schema": "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
"$schema": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json",
"apiResources": [
{
"apiProtocol": "odata-v4",
Expand Down
6 changes: 3 additions & 3 deletions __tests__/__snapshots__/ord.e2e.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`End-to-end test for ORD document Tests for default ORD document when .cdsrc.json is not present Successfully create ORD Documents with defaults 1`] = `
{
"$schema": "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
"$schema": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json",
"apiResources": [
{
"apiProtocol": "odata-v4",
Expand Down Expand Up @@ -217,7 +217,7 @@ exports[`End-to-end test for ORD document Tests for default ORD document when .c

exports[`End-to-end test for ORD document Tests for default ORD document when .cdsrc.json is present Successfully create ORD Documents with defaults 1`] = `
{
"$schema": "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
"$schema": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json",
"apiResources": [
{
"apiProtocol": "odata-v4",
Expand Down Expand Up @@ -432,7 +432,7 @@ exports[`End-to-end test for ORD document Tests for default ORD document when .c

exports[`End-to-end test for ORD document Tests for default ORD document when .cdsrc.json is present Successfully create ORD Documents with defaults and applicationNamespace configured incorrectly 1`] = `
{
"$schema": "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
"$schema": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json",
"apiResources": [
{
"apiProtocol": "odata-v4",
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unittest/__snapshots__/defaults.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`defaults $schema should return default value 1`] = `"https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json"`;
exports[`defaults $schema should return default value 1`] = `"https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json"`;

exports[`defaults baseTemplate should return default value 1`] = `
{
Expand Down
2 changes: 1 addition & 1 deletion docs/ord.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ In the custom ORD file, you can:
More information, see [ord document](https://pages.github.tools.sap/CentralEngineering/open-resource-discovery-specification/spec-v1/interfaces/document)
| ORD Field | Type | Defaults | Preset/Annotation | Usage Example | Description |
|----------|----------|----------|----------|----------|----------|
| $schema | string | ```"https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json"``` | Preset | ```"$schema": "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json"``` | Optional URL to the Open Resource Discovery document schema (defined as a JSON Schema). |
| $schema | string | ```"https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json"``` | Preset | ```"$schema": "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json"``` | Optional URL to the Open Resource Discovery document schema (defined as a JSON Schema). |
| openResourceDiscovery | string |- | - | - | 1.9 (generated by plugin) |
| policyLevel | string | `"none"` | Preset |`"policyLevel": "sap:core:v1"` | The policy level (aka. compliance level) that this ORD Document or part of it needs to be compliant with. |
| description | string | `"description": "this is an application description"` | Preset | `"description": "this is a custom description"` | The description of the ORD Document itself. |
Expand Down
2 changes: 1 addition & 1 deletion lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const defaultProductOrdId = (name) => `customer:product:${nameWithDot(name)}:`;
*/
module.exports = {
$schema:
"https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
"https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json",
openResourceDiscovery: OPEN_RESOURCE_DISCOVERY_VERSION,
policyLevel: "none",
description: "this is an application description",
Expand Down
2 changes: 1 addition & 1 deletion lib/ord.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function _getConsumptionBundles(appConfig) {

function createDefaultORDDocument(linkedCsn, appConfig) {
let ordDocument = {
$schema: "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
$schema: "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json",
openResourceDiscovery: _getOpenResourceDiscovery(appConfig),
policyLevel: _getPolicyLevel(appConfig),
description: _getDescription(appConfig),
Expand Down