From 4e82ec07347cef7214978a6a088f9df78824ec92 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:28:11 +0200 Subject: [PATCH] chore(docs): Updated API Reference (#3107) * chore(docs): Generated API Reference * small fix Co-authored-by: olivermrbl Co-authored-by: Shahed Nasser --- docs/api/admin-spec3.json | 21 +++++++++++++++++---- docs/api/admin-spec3.yaml | 21 +++++++++++++++++---- docs/api/admin/openapi.yaml | 21 +++++++++++++++++---- 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/docs/api/admin-spec3.json b/docs/api/admin-spec3.json index f6e41e681d..da98f41bb2 100644 --- a/docs/api/admin-spec3.json +++ b/docs/api/admin-spec3.json @@ -18648,17 +18648,30 @@ components: of `{api_token}`. This is where you must pass the API token. - If you're alternatively following along with the JS Client request - samples, you must provide the `apiKey` option when creating the Medusa - client: + If you're following along with the JS Client request samples, you must + provide the `apiKey` option when creating the Medusa client: - ```js + ```ts const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3, apiKey: '{api_token}' }) ``` + + + If you're using Medusa React, you can pass the `apiKey` prop to + `MedusaProvider`: + + + ```tsx + + + + ``` scheme: bearer cookie_auth: type: apiKey diff --git a/docs/api/admin-spec3.yaml b/docs/api/admin-spec3.yaml index f6e41e681d..da98f41bb2 100644 --- a/docs/api/admin-spec3.yaml +++ b/docs/api/admin-spec3.yaml @@ -18648,17 +18648,30 @@ components: of `{api_token}`. This is where you must pass the API token. - If you're alternatively following along with the JS Client request - samples, you must provide the `apiKey` option when creating the Medusa - client: + If you're following along with the JS Client request samples, you must + provide the `apiKey` option when creating the Medusa client: - ```js + ```ts const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3, apiKey: '{api_token}' }) ``` + + + If you're using Medusa React, you can pass the `apiKey` prop to + `MedusaProvider`: + + + ```tsx + + + + ``` scheme: bearer cookie_auth: type: apiKey diff --git a/docs/api/admin/openapi.yaml b/docs/api/admin/openapi.yaml index 5492810a7e..4c2251095a 100644 --- a/docs/api/admin/openapi.yaml +++ b/docs/api/admin/openapi.yaml @@ -543,17 +543,30 @@ components: of `{api_token}`. This is where you must pass the API token. - If you're alternatively following along with the JS Client request - samples, you must provide the `apiKey` option when creating the Medusa - client: + If you're following along with the JS Client request samples, you must + provide the `apiKey` option when creating the Medusa client: - ```js + ```ts const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3, apiKey: '{api_token}' }) ``` + + + If you're using Medusa React, you can pass the `apiKey` prop to + `MedusaProvider`: + + + ```tsx + + + + ``` scheme: bearer cookie_auth: type: apiKey