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

Do not omit type and name while serializing the resource object. #4007

Merged
merged 1 commit into from
Sep 26, 2018
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -1456,12 +1456,10 @@
},
"name": {
"type": "string",
"readOnly": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be sure, are all resources here supposed to have name, id and type as settable properties here?
If yes, please remove the x-ms-azure-resource flag her, if not, please identify those resources which do have name, id and type as settable and create a separate Resource definition for them.

Copy link
Contributor

@ryansbenson ryansbenson Sep 26, 2018

Choose a reason for hiding this comment

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

name, id and type should all be readonly. These fields should be generated from the URI on resource creation and are not required as input from the user. Is this not the case for the RP runtime, which requires these to be writable?

Copy link
Contributor

Choose a reason for hiding this comment

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

We talked offline, approved

"description": "The name of the resource"
},
"type": {
"type": "string",
"readOnly": true,
"description": "The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles."
}
},
Expand Down