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

fix: create new annotationFile #2432

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
10 changes: 8 additions & 2 deletions packages/adp-tooling/src/base/abap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ export async function getManifest(appId: string, adpConfig: AdpPreviewConfig, lo

// retrieve localmetadata from base project
const dataSourceName = Object.keys(manifest?.['sap.app']?.dataSources)?.[0];
const metadataUrl = `${appInfo.url}/${manifest?.['sap.app']?.dataSources?.[dataSourceName].settings.localUri}`;
const metadataPath = manifest?.['sap.app']?.dataSources?.[dataSourceName];
let metadataUrl = '';
if (metadataPath?.settings?.localUri) {//v2
metadataUrl = `${appInfo.url}/${metadataPath.settings.localUri}`;
} else if (metadataPath?.uri) { //v4
metadataUrl = `${appInfo.url}/${metadataPath.uri}$metadata`;
Copy link
Contributor Author

@Jimmy-Joseph19 Jimmy-Joseph19 Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to get metadata for all v2 apps i tested.
For one V4 app tested the request was failing. But the same request passes in CPE when baseUrl is localhost.

}

const metadata = await provider.get(metadataUrl);

//otherwise using serviceurl from manifest/$metadata eg: in this format https://services.odata.org/V2/Northwind/Northwind.svc/$metadata
console.log(metadata.data);
return manifest;
} catch (error) {
Expand Down
Loading