chore(oas): replace response with $ref class JSDoc (Admin SHI-V) (#3031)

### 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

- Ran OAS validator.
- Ran docs build script.

Expect no visible changes to the documentation.

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Patrick
2023-01-15 14:04:26 -05:00
committed by GitHub
parent 1547dd8143
commit 27a29ef24e
54 changed files with 329 additions and 302 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
chore(oas): replace response with $ref class JSDoc (Admin SHI-V)