feat(oas): pluralize OAS tags (#3315)

## What

Pluralize OAS tags

## Why

OAS tags are commonly used by code generator to group routes under a name space based on a tag. 

Our JS client convention is to use plural, e.g: client.products, client.customers. In order to minimize friction when migrating to a client generated from OAS, tags should be plural as well.

## How

Match tag naming with JS client resource naming.

## Test

* Run `yarn build`
* Run `yarn openapi:generate`
* Run `yarn redocly preview-docs docs/api/admin/openapi.yaml --config=./docs-util/redocly/config.yaml`
* Expect side menu items to be plural.
* Run `yarn redocly preview-docs docs/api/store/openapi.yaml --config=./docs-util/redocly/config.yaml`
* Expect side menu items to be plural.
This commit is contained in:
Patrick
2023-02-23 08:31:51 -05:00
committed by GitHub
parent e1b92e9b04
commit f3bf351d21
299 changed files with 362 additions and 369 deletions
@@ -32,7 +32,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - App
* - Apps
* responses:
* "200":
* description: OK
@@ -18,7 +18,7 @@ import { OauthService } from "../../../../services"
* - api_token: []
* - cookie_auth: []
* tags:
* - App
* - Apps
* responses:
* "200":
* description: OK
@@ -31,7 +31,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Batch Job
* - Batch Jobs
* responses:
* "200":
* description: OK
@@ -31,7 +31,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Batch Job
* - Batch Jobs
* responses:
* "200":
* description: OK
@@ -46,7 +46,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Batch Job
* - Batch Jobs
* responses:
* 201:
* description: OK
@@ -28,7 +28,7 @@
* - api_token: []
* - cookie_auth: []
* tags:
* - Batch Job
* - Batch Jobs
* responses:
* "200":
* description: OK
@@ -233,7 +233,7 @@ import { isDefined } from "medusa-core-utils"
* - api_token: []
* - cookie_auth: []
* tags:
* - Batch Job
* - Batch Jobs
* responses:
* "200":
* description: OK
@@ -35,7 +35,7 @@ import ProductCollectionService from "../../../../services/product-collection"
* - api_token: []
* - cookie_auth: []
* tags:
* - Collection
* - Collections
* responses:
* "200":
* description: OK
@@ -42,7 +42,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Collection
* - Collections
* responses:
* "200":
* description: OK
@@ -33,7 +33,7 @@ import ProductCollectionService from "../../../../services/product-collection"
* - api_token: []
* - cookie_auth: []
* tags:
* - Collection
* - Collections
* responses:
* "200":
* description: OK
@@ -33,7 +33,7 @@ import { defaultAdminCollectionsRelations } from "."
* - api_token: []
* - cookie_auth: []
* tags:
* - Collection
* - Collections
* responses:
* "200":
* description: OK
@@ -107,7 +107,7 @@ import { Type } from "class-transformer"
* - api_token: []
* - cookie_auth: []
* tags:
* - Collection
* - Collections
* responses:
* "200":
* description: OK
@@ -35,7 +35,7 @@ import ProductCollectionService from "../../../../services/product-collection"
* - api_token: []
* - cookie_auth: []
* tags:
* - Collection
* - Collections
* responses:
* "200":
* description: OK
@@ -44,7 +44,7 @@ import ProductCollectionService from "../../../../services/product-collection"
* - api_token: []
* - cookie_auth: []
* tags:
* - Collection
* - Collections
* responses:
* "200":
* description: OK
@@ -38,7 +38,7 @@ import { FeatureFlagDecorators } from "../../../../utils/feature-flag-decorators
* curl --location --request POST 'https://medusa-url.com/admin/currencies' \
* --header 'Authorization: Bearer {api_token}'
* tags:
* - Currency
* - Currencies
* responses:
* 200:
* description: OK
@@ -44,7 +44,7 @@ import { EntityManager } from "typeorm"
* "includes_tax": true
* }'
* tags:
* - Currency
* - Currencies
* responses:
* 200:
* description: OK
@@ -59,13 +59,11 @@ export default async (req: ExtendedRequest<Currency>, res) => {
const currencyService: CurrencyService = req.scope.resolve("currencyService")
const manager: EntityManager = req.scope.resolve("manager")
const currency = await manager.transaction(
async (transactionManager) => {
return await currencyService
.withTransaction(transactionManager)
.update(code, data)
}
)
const currency = await manager.transaction(async (transactionManager) => {
return await currencyService
.withTransaction(transactionManager)
.update(code, data)
})
res.json({ currency })
}
@@ -56,7 +56,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer Group
* - Customer Groups
* responses:
* 200:
* description: OK
@@ -44,7 +44,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer Group
* - Customer Groups
* responses:
* 200:
* description: OK
@@ -33,7 +33,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer Group
* - Customer Groups
* responses:
* 200:
* description: OK
@@ -56,7 +56,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer Group
* - Customer Groups
* responses:
* 200:
* description: OK
@@ -39,7 +39,7 @@ import { Type } from "class-transformer"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer Group
* - Customer Groups
* responses:
* 200:
* description: OK
@@ -36,7 +36,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer Group
* - Customer Groups
* responses:
* 200:
* description: OK
@@ -123,7 +123,7 @@ import { Type } from "class-transformer"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer Group
* - Customer Groups
* responses:
* 200:
* description: OK
@@ -48,7 +48,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer Group
* - Customer Groups
* responses:
* 200:
* description: OK
@@ -49,7 +49,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer
* - Customers
* responses:
* 201:
* description: OK
@@ -35,7 +35,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer
* - Customers
* responses:
* 200:
* description: OK
@@ -39,7 +39,7 @@ import customerController from "../../../../controllers/customers"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer
* - Customers
* responses:
* 200:
* description: OK
@@ -58,7 +58,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Customer
* - Customers
* responses:
* 200:
* description: OK
@@ -35,7 +35,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -54,7 +54,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount Condition
* - Discounts
* responses:
* 200:
* description: OK
@@ -53,7 +53,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount Condition
* - Discounts
* responses:
* 200:
* description: OK
@@ -83,7 +83,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -53,7 +53,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -38,7 +38,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount Condition
* - Discounts
* responses:
* 200:
* description: OK
@@ -31,7 +31,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -34,7 +34,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -52,7 +52,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount Condition
* - Discounts
* responses:
* 200:
* description: OK
@@ -36,7 +36,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount Condition
* - Discounts
* responses:
* 200:
* description: OK
@@ -35,7 +35,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -35,7 +35,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -62,7 +62,7 @@ import { optionalBooleanMapper } from "../../../../utils/validators/is-boolean"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -34,7 +34,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -54,7 +54,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -66,7 +66,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Discount
* - Discounts
* responses:
* 200:
* description: OK
@@ -87,7 +87,7 @@ import { IsType } from "../../../../utils/validators/is-type"
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -55,7 +55,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -31,7 +31,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -40,7 +40,7 @@ import { MedusaError } from "medusa-core-utils"
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -38,7 +38,7 @@ import { DraftOrder } from "../../../.."
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -44,7 +44,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -44,7 +44,7 @@ import { MedusaError } from "medusa-core-utils"
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -61,7 +61,7 @@ import { IsType } from "../../../../utils/validators/is-type"
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -54,7 +54,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Draft Order
* - Draft Orders
* responses:
* 200:
* description: OK
@@ -44,7 +44,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Gift Card
* - Gift Cards
* responses:
* 200:
* description: OK
@@ -30,7 +30,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Gift Card
* - Gift Cards
* responses:
* 200:
* description: OK
@@ -30,7 +30,7 @@ import { defaultAdminGiftCardFields, defaultAdminGiftCardRelations } from "./"
* - api_token: []
* - cookie_auth: []
* tags:
* - Gift Card
* - Gift Cards
* responses:
* 200:
* description: OK
@@ -39,7 +39,7 @@ import { isDefined } from "medusa-core-utils"
* - api_token: []
* - cookie_auth: []
* tags:
* - Gift Card
* - Gift Cards
* responses:
* 200:
* description: OK
@@ -47,7 +47,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Gift Card
* - Gift Cards
* responses:
* 200:
* description: OK
@@ -31,7 +31,7 @@ import { ProductVariantInventoryService } from "../../../../services"
* - api_token: []
* - cookie_auth: []
* tags:
* - InventoryItem
* - Inventory Items
* responses:
* 200:
* description: OK
@@ -56,7 +56,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Invite
* - Invites
* responses:
* 200:
* description: OK
@@ -49,7 +49,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Invite
* - Invites
* responses:
* 200:
* description: OK
@@ -31,7 +31,7 @@ import InviteService from "../../../../services/invite"
* - api_token: []
* - cookie_auth: []
* tags:
* - Invite
* - Invites
* responses:
* 200:
* description: OK
@@ -28,7 +28,7 @@ import InviteService from "../../../../services/invite"
* - api_token: []
* - cookie_auth: []
* tags:
* - Invite
* - Invites
* responses:
* 200:
* description: OK
@@ -34,7 +34,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Invite
* - Invites
* responses:
* 200:
* description: OK
@@ -47,7 +47,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Note
* - Notes
* responses:
* 200:
* description: OK
@@ -31,7 +31,7 @@ import NoteService from "../../../../services/note"
* - api_token: []
* - cookie_auth: []
* tags:
* - Note
* - Notes
* responses:
* 200:
* description: OK
@@ -30,7 +30,7 @@ import NoteService from "../../../../services/note"
* - api_token: []
* - cookie_auth: []
* tags:
* - Note
* - Notes
* responses:
* 200:
* description: OK
@@ -38,7 +38,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Note
* - Notes
* responses:
* 200:
* description: OK
@@ -44,7 +44,7 @@ import { EntityManager } from "typeorm"
* - api_token: []
* - cookie_auth: []
* tags:
* - Note
* - Notes
* responses:
* 200:
* description: OK
@@ -50,7 +50,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Notification
* - Notifications
* responses:
* 200:
* description: OK
@@ -44,7 +44,7 @@ import { validator } from "../../../../utils/validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - Notification
* - Notifications
* responses:
* 200:
* description: OK
@@ -48,7 +48,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -36,7 +36,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -36,7 +36,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -42,7 +42,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -37,7 +37,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -32,7 +32,7 @@ import { OrderEditService } from "../../../../services"
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -31,7 +31,7 @@ import { OrderEditService } from "../../../../services"
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -35,7 +35,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -39,7 +39,7 @@ import { IsOptional, IsString } from "class-validator"
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -41,7 +41,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -47,7 +47,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -49,7 +49,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - OrderEdit
* - Order Edits
* responses:
* 200:
* description: OK
@@ -56,7 +56,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Order
* - Orders
* responses:
* 200:
* description: OK
@@ -35,7 +35,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Order
* - Orders
* responses:
* 200:
* description: OK
@@ -38,7 +38,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Claim
* - Orders
* responses:
* 200:
* description: OK
@@ -43,7 +43,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Fulfillment
* - Orders
* responses:
* 200:
* description: OK
@@ -43,7 +43,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Fulfillment
* - Orders
* responses:
* 200:
* description: OK
@@ -44,7 +44,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Fulfillment
* - Orders
* responses:
* 200:
* description: OK
@@ -35,7 +35,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Order
* - Orders
* responses:
* 200:
* description: OK
@@ -38,7 +38,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Swap
* - Orders
* responses:
* 200:
* description: OK
@@ -35,7 +35,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Order
* - Orders
* responses:
* 200:
* description: OK
@@ -35,7 +35,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Order
* - Orders
* responses:
* 200:
* description: OK
@@ -48,7 +48,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Claim
* - Orders
* responses:
* 200:
* description: OK
@@ -73,7 +73,7 @@ import { AddressPayload, FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Claim
* - Orders
* responses:
* 200:
* description: OK
@@ -73,7 +73,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Fulfillment
* - Orders
* responses:
* 200:
* description: OK
@@ -45,7 +45,7 @@ import {
* - api_token: []
* - cookie_auth: []
* tags:
* - Order
* - Orders
* responses:
* 200:
* description: OK
@@ -55,7 +55,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Order
* - Orders
* responses:
* 200:
* description: OK
@@ -56,7 +56,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Swap
* - Orders
* responses:
* 200:
* description: OK
@@ -76,7 +76,7 @@ import { FindParams } from "../../../../types/common"
* - api_token: []
* - cookie_auth: []
* tags:
* - Swap
* - Orders
* responses:
* 200:
* description: OK

Some files were not shown because too many files have changed in this diff Show More