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

SAP CAP Media handling annotations (BAS language compiler error) #118

Open
edgar1506 opened this issue Mar 7, 2023 · 0 comments
Open

SAP CAP Media handling annotations (BAS language compiler error) #118

edgar1506 opened this issue Mar 7, 2023 · 0 comments

Comments

@edgar1506
Copy link

Hello, I'm creating the following entity:

entity attachments : managed {
  key ID                : UUID;
      purchaseOrderId : String(36);
      content           : LargeBinary  @Core.MediaType   : mediaType  @Core.ContentDisposition.Filename : fileName  @Core.ContentDisposition.Type : 'inline';
      mediaType         : String(120)  @Core.IsMediaType : true;
      fileName          : String(120);
      size              : Integer;
      url               : String(240);
}

However BAS language compiler marks it in red and when I hover I get the following message:

Path mediaType leads to element. The path should lead to type Edm.String.CDS (annotations)

Apparently it's expecting the reference to mediaType to be a string, but according to the official documentation, the annotations are correct and the app works as expected, so I don't know why BAS is complaining.

Here is the result of executing cds --version:

@sap/cds: 6.6.0
@sap/cds-compiler: 3.7.2
@sap/cds-dk: 6.3.1
@sap/cds-foss: 4.0.0
@sap/cds-mtx: -- missing --
@sap/eslint-plugin-cds: 2.6.3
@sap/xssec: 3.2.17
Node.js: v16.19.0
cap-media-handling: 1.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant