cancel
Showing results for 
Search instead for 
Did you mean: 

How to provide "--definitions" as option to @sap/dwc-cli for all definitions?

7aeser
Participant
0 Kudos

Hi all,

i am trying to read the detailed space definitions from SAP DWC using the @sap/dwc-cli as Node.js module dependency.

Therefore i use the CLI parameter "--definitions" or "-D" with value "" (empty string) in order to get all definitions. But unfortunately this gets ignored.If i use this "--no-space-definition": "" it works like expected.

What do i have to pass for "-D" to get all definitions?

Coding looks like this, but there is nothing incorrect. It is only about the passing of the "--definitions" param.

const options = {"--host": "MYHOST"}

await commands["spaces read"]({...options,...{"--definitions", ""}})

Accepted Solutions (1)

Accepted Solutions (1)

7aeser
Participant
0 Kudos

Ok solved it by blind testing.
You have to set it like "--definitions": true

0 Kudos

Thank you for your question! The situation you described seems like a bug to me. When reading all definitions, it should be sufficient to set "--definitions": "". We'll investigate this and may add a fix to one of the next versions of the CLI.

Answers (1)

Answers (1)

0 Kudos

Hi lkaeser

when reading your question again I was asking myself if this is a typo?

await commands["spaces read"]({...options,...{"--definitions", ""}})

Can you try await commands["spaces read"]({...options,...{"--definitions": ""}})

"--definitions", "" vs "--definitions": ""

Thank you!

7aeser
Participant

Hi jascha.kanngiesser,

I checked my git history but it wasn`t a typo.

I tried again using "" empty string but then I only receive the Space "config" but not the definitions.
For me it currently only works by setting it to true.

Offtopic Question:
Is there any roadmap to enable OAuth Client Credentials (two-legged). This would be a game change for machine2machine communication where no user context exists. E.g. scheduled jobs of a CICD pipeline. Currently it is only possible with the puppeteer workaround or by providing a long living access token from OAuth Authorization Code grant.

Best Regards,
Lukas

0 Kudos

Hi Lukas,

thanks for the update! I'll see whether I find something related. Regarding the two-legged OAuth support, we cannot share a detailed timeline yet, but it's heavily requested and we're looking into it. Stay tuned!

Thanks,
Jascha