-
Notifications
You must be signed in to change notification settings - Fork 326
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
Adds spp model get
command Closes #6105
#6409
base: main
Are you sure you want to change the base?
Conversation
Thank you, well try to review it ASAP! |
4e27dc2
to
13ca6fd
Compare
I have converted it to draft, as there are some conflicts to be resolved. |
13ca6fd
to
83dcfdd
Compare
@mkm17 I added the |
83dcfdd
to
3483a1e
Compare
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.
Nice start @mkm17, let's change a few things before we proceed.
3483a1e
to
7d3db71
Compare
@milanholemans thank you again for the review. I believe I have addressed all the suggested changes. I have one question regarding the tests: I updated it to |
Is there a reason why we stringify everything instead of using |
7d3db71
to
8caeee1
Compare
@milanholemans I saw this method somewhere in the code, but definitely it is a much better idea. Thank you. |
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.
It's looking good, we're almost there.
m365 spp model get --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "climicrosoft365Model" | ||
``` | ||
|
||
### Standard response |
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.
This should be a subtitle of the Response
header.
"ModifiedBy": "i:0#.w|sharepoint\\system", | ||
"ObjectId": "01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S", | ||
"PublicationType": 0, | ||
"Schemas": {"Extractors":{"Adressee":{"concepts":{"0a18ef8b-c0cd-435d-8a45-37738fef4f6f":{"name":"Adressee"}},"relationships":[]},"Discount Percentage":{"concepts":{"48c09840-d2da-4416-a02d-68113da24d18":{"name":"Discount Percentage"}},"relationships":[]},"Date of Change":{"concepts":{"f39b4e2a-e945-4a2e-99a0-561334037a66":{"name":"Date of Change"}},"relationships":[]},"Date Completed":{"concepts":{"3559972a-d7c5-4ccb-b8cb-e4b852da2399":{"name":"Date Completed"}},"relationships":[]},"Contributor":{"concepts":{"6af8ef33-4bf1-49ca-93d3-7a2358746747":{"name":"Contributor"}},"relationships":[]}}}, |
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.
For all properties that contain a JSON object, let's format them the usual way instead of putting everything on one line.
|
||
When we make use of the option `withPublications`, the response will differ. | ||
|
||
## Response |
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.
Let's remove this header.
src/utils/spp.ts
Outdated
UniqueId: string; | ||
Publications?: any[]; | ||
ModelSettings?: string; | ||
'odata.null'?: boolean; |
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.
This property is not really part of an SppModel
. I suggest we remove it from here. In the command when we check for odata.null
, let's just cast the result to any
in the if-statement.
if ((result as any)['odata.null'] === true) { .... }
8caeee1
to
bb89289
Compare
@milanholemans Thank you for the review. The changes have been applied to the new version. |
Adds
spp model get
command Closes #6105