chore(oas): PascalCase for schemas + remove x-resourceId (#2847)
### What Rename all JSDoc OAS `@schema` and `$ref: #/components/schemas/` from snake_case to PascalCase, `foo_bar -> FooBar` Extra scope: Remove `x-resourceId` from JSDoc OAS. ### Why Classes use PascalCase as a convention but the OAS @schemas describing them were using snake_case. OAS code generators tend to use the schema name when generating typed models. In order to avoid mismatch between source code, the OAS, and the generated client code, it is advised to align OAS @schemas formatting to the classes they represent. Extra scope: x-resourceId is not a widely used OAS property. It's current usage in our OAS does not provide additional value. Therefore, we recommend to remove it in order to have one less item to maintain. ### How Good old search & replace. Regex search to further make sure we didn't miss any. The scope is limited to `@schema` definition and their usage in `$ref: #/components/schemas/`. ### Test * Ran OAS validator. * Ran docs build script. Expect no visible changes to the documentation. Resolves: CORE-852, CORE-859
This commit is contained in:
@@ -105,10 +105,9 @@ export class ShippingMethod {
|
||||
}
|
||||
|
||||
/**
|
||||
* @schema shipping_method
|
||||
* @schema ShippingMethod
|
||||
* title: "Shipping Method"
|
||||
* description: "Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment."
|
||||
* x-resourceId: shipping_method
|
||||
* type: object
|
||||
* required:
|
||||
* - shipping_option_id
|
||||
@@ -124,7 +123,7 @@ export class ShippingMethod {
|
||||
* example: so_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
* shipping_option:
|
||||
* description: Available if the relation `shipping_option` is expanded.
|
||||
* $ref: "#/components/schemas/shipping_option"
|
||||
* $ref: "#/components/schemas/ShippingOption"
|
||||
* order_id:
|
||||
* description: "The id of the Order that the Shipping Method is used on."
|
||||
* type: string
|
||||
@@ -164,7 +163,7 @@ export class ShippingMethod {
|
||||
* type: array
|
||||
* description: Available if the relation `tax_lines` is expanded.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/shipping_method_tax_line"
|
||||
* $ref: "#/components/schemas/ShippingMethodTaxLine"
|
||||
* price:
|
||||
* description: "The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of."
|
||||
* type: integer
|
||||
|
||||
Reference in New Issue
Block a user