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

Allow generic override / expand of ORD information #49

Open
Fannon opened this issue Aug 28, 2024 · 2 comments
Open

Allow generic override / expand of ORD information #49

Fannon opened this issue Aug 28, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Fannon
Copy link
Contributor

Fannon commented Aug 28, 2024

Right now, the documentation in https://github.com/cap-js/ord/blob/main/ord.md indicates two ways to add ORD information:

  • Add global ord config, that is then applied to several places
  • Override ORD information via Annotations on CDS Models like a Service.

This still misses some flexibility:

  • It's not possible to add new ORD resources or resource types that are not supported / provided by the CAP Framework right now (e.g. Data Products or Entity Types)
  • It's not possible to override something in case this is necessary

Suggestion

Add a completely generic way to provide partial ORD documents, e.g. like:

// cdsrc.json or package.json cds context
  "ord": {
    "namespace": "sap.sample",
    "description": "this is my custom description",
    "policyLevel": "sap:core:v1",
    "customOrd": "./ord/custom.ord.json" // Link to static ORD JSON file to merge in
  }

Expected behavior:

  • The interface of the custom object is the same as the ORD Document interface.
  • The collections (like "dataProducts" are iterated and for those resource types that CAP supports we check if they are already defined through CAP. If yes, the custom definition wins (override)"
  • All content in the custom object are merged to the final ORD Document that the CAP plugin produces.
@Fannon Fannon added the enhancement New feature or request label Aug 28, 2024
@zongqichen
Copy link
Contributor

Hi @Fannon, it's a good proposal. I would suggest that renames customOrd -> customOrdContentFile, with more context.

@Fannon
Copy link
Contributor Author

Fannon commented Aug 29, 2024

Hi @Fannon, it's a good proposal. I would suggest that renames customOrd -> customOrdContentFile, with more context.

Sounds good!

@zongqichen zongqichen self-assigned this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants