Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion @theme/ext/use-configure-replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ContextProps = {
};

const SCOPES = ['menu:read', 'menu:write', 'orders:read', 'orders:write', 'revenue:read'];
const BASE_URL = 'https://cafe.cloud.redocly.com';
const BASE_URL = 'https://api.cafe.redocly.com';
const CLIENT_NAME = 'auth';

type ClientCredentials = { clientId: string; clientSecret: string };
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Redocly Cafe API

This is an example API that showcases the [OpenAPI 3.2 specification](https://spec.openapis.org/oas/v3.2.0.html).
It also describes a real API server hosted at [cafe.cloud.redocly.com](https://cafe.cloud.redocly.com).
It also describes a real API server hosted at [api.cafe.redocly.com](https://api.cafe.redocly.com).
The API description is available at [cafe.redocly.com/openapi/cafe](https://cafe.redocly.com/openapi/cafe).

## Contribution
Expand Down
8 changes: 4 additions & 4 deletions openapi/cafe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ info:
url: https://opensource.org/licenses/MIT
termsOfService: https://redocly.com/subscription-agreement
servers:
- url: https://cafe.cloud.redocly.com
- url: https://api.cafe.redocly.com
description: Live server.
tags:
- name: Authorization
Expand Down Expand Up @@ -51,16 +51,16 @@ components:
description: OAuth2 authorization for API access.
flows:
authorizationCode:
authorizationUrl: https://cafe.cloud.redocly.com/oauth2/authorize
tokenUrl: https://cafe.cloud.redocly.com/oauth2/token
authorizationUrl: https://api.cafe.redocly.com/oauth2/authorize
tokenUrl: https://api.cafe.redocly.com/oauth2/token
scopes:
menu:read: Read access to menu items and images
menu:write: Write access to menu items (create, delete)
orders:read: Read access to orders
orders:write: Write access to orders (create, update, delete)
revenue:read: Read access to revenue statistics
clientCredentials:
tokenUrl: https://cafe.cloud.redocly.com/oauth2/token
tokenUrl: https://api.cafe.redocly.com/oauth2/token
scopes:
menu:read: Read access to menu items and images
menu:write: Write access to menu items (create, delete)
Expand Down
2 changes: 1 addition & 1 deletion openapi/paths/oauth2_register.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ post:
dataValue:
name: auth
redirectUris:
- https://cafe.cloud.redocly.com/callback
- https://api.cafe.redocly.com/callback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: Low

The example redirectUris uses the API domain (api.cafe.redocly.com). Since this represents the client application's callback URL, using the API's subdomain is semantically misleading for users. Use a generic domain like https://client.example.com/callback instead.

scopes:
- menu:read
- menu:write
Expand Down
Loading