SAP / open-ux-tools

Enable community collaboration to jointly promote and facilitate best in class tooling capabilities
Apache License 2.0
83 stars 35 forks source link

FEATURE - FPM writer shall support contextPath for new pages #922

Open schreckstefan opened 1 year ago

schreckstefan commented 1 year ago

As a developer, I want to use contextPath instead of entitySet for the definition of Fiori pages in newer UI5 releases, so that I can use SAP Graph and containments

Description

Fiori Elements uses a new way to define pages in manifest, using a contextPath instead of entitySet. As clarified with the responsible developers, the contextPath shall also be used when defining custom pages. Indeed, the template of the FPM writer for custom pages does not provide this option yet.

Technical Design

What modules need to be created or enhanced? https://github.com/SAP/open-ux-tools/blob/main/packages/fe-fpm-writer/templates/page/custom/1.94/manifest.json

How would the functionality be exposed and how can it be consumed? The API shall provide both options. contextPath is supported for UI5 versions from 1.90 onwards, thus it is sufficient to enhance the existing template for 1.94.

Acceptance Criteria

GivenWhenThen format (https://martinfowler.com/bliki/GivenWhenThen.html)

Given I have an API call to crate a custom page AND the UI5 version is 1.94 or higher when I supply the call with a contextPath then the target settings of the new page in manifest gets generated with contextPath instead of entitySet

Notes

Tasks

schreckstefan commented 1 year ago

p.s. I now recognized that we do not have the custom(.ts) API, but list.ts and object.ts with the same gap. Here, contextPath shall also be supported.

tobiasqueck commented 1 year ago

@schreckstefan is this done or is there anything still open?