-
Notifications
You must be signed in to change notification settings - Fork 33
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
To support the exclusion of annotations from manifest json for cap projects #1994
Conversation
🦋 Changeset detectedLatest commit: 5003513 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes appear to coverage the necessary changes to support CAP projects service and annotation writing.
changeset ✅
@@ -13,15 +13,17 @@ import type { NamespaceAlias, OdataService } from '../types'; | |||
export function getAnnotationNamespaces({ metadata, annotations }: Partial<OdataService>): NamespaceAlias[] { | |||
// Enhance service with annotations namespaces | |||
const schemaNamespaces = metadata ? getNamespaces(metadata) : []; | |||
|
|||
if (annotations?.xml) { | |||
const edmxAnnotations = annotations as EdmxAnnotationsInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not test for the property of EdmxAnnotationsInfo
before casting to that type?
const edmxAnnotations = annotations as EdmxAnnotationsInfo; | |
if (edmxAnnotations?.xml) { | |
const edmxAnnotations = annotations as EdmxAnnotationsInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAnnotationNamespaces
is called only if service is edmx so I think its okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But thats not relevant within the context of the function. Please update to cast after determining the type. I think that makes more logically sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or better still change the parameter type to be EdmxAnnotationInfo
if that is what should be passed to this function.
….com/SAP/open-ux-tools into refactor/move-cds-to-service-writers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest commits to skip adding proxy middleware backend config is appropriate for CAP.
Re-approving.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good.
Test coverage is good.
Changeset looks good.
Thanks for reviewing everyone |
#1949
fiori-elements-writer
:Update fiori-elements-writer to not append local annotation names to FE service if the service type is CDS.
odata-service-writer
Add logic for writing annotation CDS files to the odata-service-writer module. If the service type is CDS and annotations are provided, write the annotations into the CDS file.-
OdataService
annotation feature to accommodate both EDMX and CAP interfaces.