fix(oas): add missing x-codegen + fix schema naming and $ref (#3312)
## What Add missing x-codegen + fix schema naming and $ref ## Why OAS code generator was missing information to be able to match current JS client. ## How Ensure OAS matches JS client methods.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
fix(oas): add missing x-codegen + fix schema naming and $ref
|
||||
@@ -13,6 +13,9 @@ import { joinLevels } from "./utils/join-levels"
|
||||
* - (path) id=* {string} The ID of the Inventory Item.
|
||||
* - (query) expand {string} Comma separated list of relations to include in the results.
|
||||
* - (query) fields {string} Comma separated list of fields to include in the results.
|
||||
* x-codegen:
|
||||
* method: retrieve
|
||||
* queryParams: AdminGetInventoryItemsItemParams
|
||||
* x-codeSamples:
|
||||
* - lang: JavaScript
|
||||
* label: JS Client
|
||||
|
||||
@@ -51,6 +51,9 @@ import { AdminInventoryItemsListWithVariantsAndLocationLevelsRes } from "."
|
||||
* - (query) height {string} height to search for.
|
||||
* - (query) width {string} width to search for.
|
||||
* - (query) requires_shipping {string} requires_shipping to search for.
|
||||
* x-codegen:
|
||||
* method: list
|
||||
* queryParams: AdminGetInventoryItemsParams
|
||||
* x-codeSamples:
|
||||
* - lang: JavaScript
|
||||
* label: JS Client
|
||||
|
||||
@@ -15,6 +15,9 @@ import { FindParams } from "../../../../types/common"
|
||||
* - (query) limit=20 {integer} Limit the number of stock locations levels returned.
|
||||
* - (query) expand {string} Comma separated list of relations to include in the results.
|
||||
* - (query) fields {string} Comma separated list of fields to include in the results.
|
||||
* x-codegen:
|
||||
* method: listLocationLevels
|
||||
* queryParams: AdminGetInventoryItemsItemLocationLevelsParams
|
||||
* x-codeSamples:
|
||||
* - lang: JavaScript
|
||||
* label: JS Client
|
||||
|
||||
@@ -40,7 +40,7 @@ import { extendedFindParamsMixin } from "../../../../types/common"
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminGetReservationReservationsReq"
|
||||
* $ref: "#/components/schemas/AdminReservationsListRes"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
|
||||
@@ -9,6 +9,8 @@ import { IInventoryService } from "../../../../interfaces"
|
||||
* x-authenticated: true
|
||||
* parameters:
|
||||
* - (path) id=* {string} The ID of the Reservation to delete.
|
||||
* x-codegen:
|
||||
* method: delete
|
||||
* x-codeSamples:
|
||||
* - lang: JavaScript
|
||||
* label: JS Client
|
||||
@@ -36,19 +38,7 @@ import { IInventoryService } from "../../../../interfaces"
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* properties:
|
||||
* id:
|
||||
* type: string
|
||||
* description: The ID of the deleted Reservation.
|
||||
* object:
|
||||
* type: string
|
||||
* description: The type of the object that was deleted.
|
||||
* default: reservation
|
||||
* deleted:
|
||||
* type: boolean
|
||||
* description: Whether or not the Reservation was deleted.
|
||||
* default: true
|
||||
* $ref: "#/components/schemas/AdminReservationsDeleteRes"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
|
||||
@@ -56,7 +56,7 @@ export default (app) => {
|
||||
}
|
||||
|
||||
/**
|
||||
* @schema AdminPostReservationsReq
|
||||
* @schema AdminReservationsRes
|
||||
* type: object
|
||||
* required:
|
||||
* - reservation
|
||||
@@ -69,7 +69,7 @@ export type AdminReservationsRes = {
|
||||
}
|
||||
|
||||
/**
|
||||
* @schema AdminGetReservationReservationsReq
|
||||
* @schema AdminReservationsListRes
|
||||
* type: object
|
||||
* required:
|
||||
* - reservations
|
||||
@@ -108,6 +108,26 @@ export const defaultReservationFields = [
|
||||
"updated_at",
|
||||
]
|
||||
|
||||
/**
|
||||
* @schema AdminReservationsDeleteRes
|
||||
* type: object
|
||||
* required:
|
||||
* - id
|
||||
* - object
|
||||
* - deleted
|
||||
* properties:
|
||||
* id:
|
||||
* type: string
|
||||
* description: The ID of the deleted Reservation.
|
||||
* object:
|
||||
* type: string
|
||||
* description: The type of the object that was deleted.
|
||||
* default: reservation
|
||||
* deleted:
|
||||
* type: boolean
|
||||
* description: Whether or not the Reservation was deleted.
|
||||
* default: true
|
||||
*/
|
||||
export type AdminReservationsDeleteRes = DeleteResponse
|
||||
|
||||
export * from "./create-reservation"
|
||||
|
||||
@@ -63,6 +63,9 @@ import {
|
||||
* - (query) limit=20 {integer} Limit the number of Reservations returned.
|
||||
* - (query) expand {string} (Comma separated) Which fields should be expanded in the product category.
|
||||
* - (query) fields {string} (Comma separated) Which fields should be included in the product category.
|
||||
* x-codegen:
|
||||
* method: list
|
||||
* queryParams: AdminGetReservationsParams
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
@@ -80,7 +83,7 @@ import {
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/AdminGetReservationReservationsReq"
|
||||
* $ref: "#/components/schemas/AdminReservationsListRes"
|
||||
* "400":
|
||||
* $ref: "#/components/responses/400_error"
|
||||
* "401":
|
||||
|
||||
Reference in New Issue
Block a user