-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
chore(oas): replace response with $ref class JSDoc (Admin SHI-V) #3031
Conversation
🦋 Changeset detectedLatest commit: 9ed7b3c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
self-review: highlighting noteworthy code changes.
* description: Whether or not the items were deleted. | ||
* default: true | ||
*/ | ||
export type AdminDeleteShippingProfileRes = DeleteResponse |
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.
simply moved below all relation declarations
export type AdminStockLocationsRes = { | ||
stock_location: StockLocationDTO | ||
} | ||
|
||
export type AdminStockLocationsDeleteRes = DeleteResponse |
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.
No usage found across the codebase. Not implemented.
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!
Scope
Admin routes directories SHI to V.
What
Move inline OAS response schema declaration under their respective class declarations in order to expose them through
#/components/schemas
. Replace inline OAS response schema with a$ref
reference pointing to the newly declared schema.Why
Having response declared as its own "named" schema will allow OAS code generators to output typed entities/DTO that can be consumed without having to reference the route/operation.
How
Declare a new @Schema JSDoc for each "Res" class used to parse and validate request body. Move the current inline requestBody to the new @Schema.
Test
Expect no visible changes to the documentation.