-
Notifications
You must be signed in to change notification settings - Fork 14
CLOUDP-304055: IPA-106 Create: The request should be a Request suffixed object #473
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
Conversation
| | xgen-IPA-106-create-method-request-body-is-request-suffixed-object | The Create method request should be a Request suffixed object. http://go/ipa/106 | warn | | ||
|
|
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.
Could you point me to where this is expected in the IPA 106? I disagree with enforcing this particular rule because it creates unnecessary redundancy in our codebase since developers are forced to duplicate views with only minor name changes
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.
API producers should implement as a Request suffixed object
A Request object must include only input fields
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.
ah I missed it. Thanks
I’m curious about the reasons behind prefixing view objects with “Request”. This naming convention concerns me because it might force us to create duplicate view definitions with different names, when we could potentially use Schema.AccessMode to maintain a single view that adapts based on context. Am I missing something? Maybe I misunderstood the proposed change 🤔
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.
You can think of CreateRequest suffixed schemas as an example for this guideline. View suffixed schemas are being used for responses as far as I know
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.
I’m curious about the reasons behind prefixing view objects wit
It's a somewhat recommend practice that helps isolate changes between payloads, some feel strongly it helps to make clear what's write only vs read only while like you some have concerns on duplication
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.
LGTM
Proposed changes
Jira ticket: CLOUDP-304055
The Create method request body should be a Request suffixed object
Assumptions:
requestBodycontent can exist. API producers can define exceptions for each of them, adding JavaExtensionPropertyat@ContentlevelChecklist
Changes to Spectral
Further comments