-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(oas): Fix OAS related to JWT authentication (#5448)
* chore(oas): Fix OAS related to JWT authentication * generate openapi spec files * remove L option in curl examples
- Loading branch information
1 parent
1a10822
commit c67d490
Showing
34 changed files
with
65 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
www/apps/api-reference/specs/admin/code_samples/Shell/admin_auth_token/post.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
www/apps/api-reference/specs/admin/components/schemas/AdminBearerAuthRes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
type: object | ||
properties: | ||
accessToken: | ||
description: Access token for subsequent authorization. | ||
access_token: | ||
description: Access token that can be used to send authenticated requests. | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...de_samples/JavaScript/store_token/post.js → ...mples/JavaScript/store_auth_token/post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import Medusa from "@medusajs/medusa-js" | ||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) | ||
medusa.store.auth.getToken({ | ||
medusa.auth.getToken({ | ||
email: 'user@example.com', | ||
password: 'supersecret' | ||
}) | ||
.then(({ accessToken }) => { | ||
console.log(accessToken); | ||
.then(({ access_token }) => { | ||
console.log(access_token); | ||
}); |
2 changes: 1 addition & 1 deletion
2
www/apps/api-reference/specs/store/code_samples/Shell/store_auth/delete.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
curl -X DELETE '{backend_url}/store/auth' \ | ||
-H 'Cookie: connect.sid={sid}' | ||
-H 'Authorization: Bearer {access_token}' |
2 changes: 1 addition & 1 deletion
2
www/apps/api-reference/specs/store/code_samples/Shell/store_auth/get.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
curl '{backend_url}/store/auth' \ | ||
-H 'Cookie: connect.sid={sid}' | ||
-H 'Authorization: Bearer {access_token}' |
6 changes: 6 additions & 0 deletions
6
www/apps/api-reference/specs/store/code_samples/Shell/store_auth_token/post.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
curl -X POST '{backend_url}/store/auth/token' \ | ||
-H 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"email": "user@example.com", | ||
"password": "supersecret" | ||
}' |
2 changes: 1 addition & 1 deletion
2
www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/get.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
curl '{backend_url}/store/customers/me' \ | ||
-H 'Cookie: connect.sid={sid}' | ||
-H 'Authorization: Bearer {access_token}' |
2 changes: 1 addition & 1 deletion
2
www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me/post.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_addresses/post.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...erence/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/delete.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \ | ||
-H 'Cookie: connect.sid={sid}' | ||
-H 'Authorization: Bearer {access_token}' |
2 changes: 1 addition & 1 deletion
2
...eference/specs/store/code_samples/Shell/store_customers_me_addresses_{address_id}/post.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
www/apps/api-reference/specs/store/code_samples/Shell/store_customers_me_orders/get.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
curl '{backend_url}/store/customers/me/orders' \ | ||
-H 'Cookie: connect.sid={sid}' | ||
-H 'Authorization: Bearer {access_token}' |
2 changes: 1 addition & 1 deletion
2
...ps/api-reference/specs/store/code_samples/Shell/store_customers_me_payment-methods/get.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
curl '{backend_url}/store/customers/me/payment-methods' \ | ||
-H 'Cookie: connect.sid={sid}' | ||
-H 'Authorization: Bearer {access_token}' |
6 changes: 0 additions & 6 deletions
6
www/apps/api-reference/specs/store/code_samples/Shell/store_token/post.sh
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
www/apps/api-reference/specs/store/components/schemas/StoreBearerAuthRes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
type: object | ||
properties: | ||
accessToken: | ||
description: Access token for subsequent authorization. | ||
access_token: | ||
description: Access token that can be used to send authenticated requests. | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c67d490
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs-ui – ./www/apps/ui
docs-ui-git-develop-medusajs.vercel.app
docs-ui-medusajs.vercel.app
docs-ui.vercel.app
c67d490
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
api-reference – ./www/apps/api-reference
api-reference-medusajs.vercel.app
api-reference-git-develop-medusajs.vercel.app
api-reference-delta.vercel.app
docs.medusajs.com
c67d490
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-docs – ./www/apps/docs
medusa-docs-git-develop-medusajs.vercel.app
medusa-docs.vercel.app
medusa-docs-medusajs.vercel.app