Skip to content

Commit

Permalink
eat: add $schema property with default value to the top of the ORD do…
Browse files Browse the repository at this point in the history
…cument
  • Loading branch information
aramovic79 committed Aug 22, 2024
2 parents 7e1402c + c158007 commit ce7b97c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const nameWithSpaces = (name) => {
* @module defaults
*/
module.exports = {
$schema: "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
openResourceDiscovery: "1.9",
policyLevel: "none",
description: "this is an application description",
Expand Down
3 changes: 2 additions & 1 deletion lib/ord.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ module.exports = (csn) => {
throw error;
}

let oReturn = {openResourceDiscovery: "1.9",
let oReturn = { $schema: "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
openResourceDiscovery: "1.9",
policyLevel: fGetPolicyLevel(global),
description: fGetDescription(global),
products: fGetProducts(global),
Expand Down
2 changes: 1 addition & 1 deletion ord.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ The below is the table for all the supported ORD Fields containing defaults and

Note: `namespace` is usually taken from `.cdsrc.json` if not we take the `package.json` name.


| 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). |
| 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

0 comments on commit ce7b97c

Please sign in to comment.