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: invalid ord document after enable multitenancy #109

Open
zongqichen opened this issue Jan 8, 2025 · 0 comments · May be fixed by #110
Open

Fix: invalid ord document after enable multitenancy #109

zongqichen opened this issue Jan 8, 2025 · 0 comments · May be fixed by #110
Assignees
Labels
bug Something isn't working

Comments

@zongqichen
Copy link
Contributor

After add multitenancy to cap project by following command cds add multitenancy, package @sap/cds-mtxs will implicitly extend model with MTXServices:

class MTXServices extends cds.Service { init(){
  DEBUG?.('bootstrapping MTX services...')
  const { definitions } = cds.model
  const models = []
...

The additional content is:

{
  "ordId": "sap.sm:apiResource:cds.xt.MTXServices:v1",
  "title": "cds.xt.MTXServices",
  "shortDescription": "Short description for cds.xt.MTXServices",
  "description": "Description for cds.xt.MTXServices",
  "version": "1.0.0",
  "lastUpdate": "2025-01-08T11:50:05+01:00",
  "visibility": "public",
  "partOfGroups": [
    "sap.cds:service:sap.sm:cds.xt.MTXServices"
  ],
  "releaseStatus": "active",
  "apiProtocol": "odata-v4",
  "resourceDefinitions": [
    {
      "type": "openapi-v3",
      "mediaType": "application/json",
      "url": "/.well-known/open-resource-discovery/v1/api-metadata/cds.xt.MTXServices.oas3.json",
      "accessStrategies": [
        {
          "type": "open"
        }
      ]
    },
    {
      "type": "edmx",
      "mediaType": "application/xml",
      "url": "/.well-known/open-resource-discovery/v1/api-metadata/cds.xt.MTXServices.edmx",
      "accessStrategies": [
        {
          "type": "open"
        }
      ]
    }
  ],
  "entryPoints": [
    null
  ],
  "extensible": {
    "supported": "no"
  },
  "entityTypeMappings": [
    {
      "entityTypeTargets": [
        {
          "ordId": "sap.odm:entityType:BusinessPartner:v1"
        },
        {
          "ordId": "sap.odm:entityType:Product:v1"
        },
        {
          "ordId": "sap.odm:entityType:PurchaseOrder:v1"
        }
      ]
    }
  ]
}

There are three errors showing in ord validator:

  1. property must have required property "partOfPackage".
  2. entryPoints contains null.
  3. The description must not contain the short description.
@zongqichen zongqichen added the bug Something isn't working label Jan 8, 2025
@zongqichen zongqichen linked a pull request Jan 8, 2025 that will close this issue
@zongqichen zongqichen self-assigned this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant