Skip to content

Commit 48933cd

Browse files
update Open Source Docs from Roblox internal teams
1 parent 2ccb97d commit 48933cd

File tree

14 files changed

+551
-570
lines changed

14 files changed

+551
-570
lines changed

content/common/navigation/cloud/reference.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ navigation:
1010
path: /cloud/reference/errors
1111
- title: OAuth 2.0
1212
path: /cloud/reference/oauth2
13+
- title: OpenAPI Descriptions
14+
path: /cloud/reference/openapi
1315
- heading: v2 Resources
1416
- title: All Cloud API
1517
path: /cloud/reference

content/en-us/cloud/open-cloud/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ The legacy APIs, no matter which types of authentication they support, can incor
2828

2929
See the documentation for how to use [API keys](api-keys.md) or [OAuth 2.0](oauth2-overview.md). API keys are the easiest way to get started.
3030

31-
1. Use a tool like [Postman](https://www.postman.com) or the [OAuth 2.0 sample app](oauth2-sample.md) to test API calls.
31+
1. Test API calls using tools like [Postman](https://www.postman.com) with [OpenAPI descriptions](../reference/openapi.md) and the [OAuth 2.0 sample app](oauth2-sample.md).
3232
1. Review the [resource guides](experience-notifications.md) for end-to-end walkthroughs of using certain APIs.
3333
1. See the Open Cloud [reference documentation](../reference/index.md) for the full list of v1 and v2 resources, [common API patterns](../reference/patterns.md), and [types](../reference/types.md).

content/en-us/cloud/reference/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ The **Common Components** section of the reference documentation includes concep
1111
- [Patterns](../../cloud/reference/patterns.md) - Special considerations and patterns for making requests and handling responses.
1212
- [Types](../../cloud/reference/types.md) - How to handle common types used by Open Cloud in requests and responses.
1313
- [Errors](../../cloud/reference/errors.md) - Handling errors when working with resources.
14+
- [OpenAPI Descriptions](../../cloud/reference/openapi.md) - Streamline development with OpenAPI descriptions of Open Cloud APIs.
1415

1516
Each page in the **Resources** section represents a resource and includes all available operations for that resource.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: OpenAPI Descriptions
3+
description: Provides links to the Open Cloud JSON files that are compliant to the OpenAPI Specification, explains their use cases, and outlines additional information.
4+
---
5+
6+
The reference pages in the **Resources** section are rendered from JSON files that are [OpenAPI descriptions](https://learn.openapis.org/glossary.html). These files use [version 3.0.4](https://spec.openapis.org/oas/v3.0.4) of the OpenAPI specification.
7+
8+
These files are open source and can be used with tools like the [Swagger Editor](https://editor.swagger.io/) and [Postman](https://www.postman.com/) to test API calls and help streamline development.
9+
10+
These OpenAPI descriptions are still under active development and may contain issues. The pages under the **Resources** section are the official reference.
11+
12+
## OpenAPI Description Files
13+
14+
OpenAPI description files are available at the following locations within the [creator-docs](https://github.com/Roblox/creator-docs/tree/main/content/en-us/reference/cloud) repository:
15+
16+
```text
17+
# All V2 Resources
18+
https://github.com/Roblox/creator-docs/blob/main/content/en-us/reference/cloud/cloud.docs.json
19+
20+
# V1 Assets
21+
https://github.com/Roblox/creator-docs/blob/main/content/en-us/reference/cloud/assets/v1.json
22+
23+
# V1 Ordered Data Stores
24+
https://github.com/Roblox/creator-docs/blob/main/content/en-us/reference/cloud/datastores-api/ordered-v1.json
25+
26+
# V1 Standard Data Stores
27+
https://github.com/Roblox/creator-docs/blob/main/content/en-us/reference/cloud/datastores-api/v1.json
28+
29+
# V1 Messaging
30+
https://github.com/Roblox/creator-docs/blob/main/content/en-us/reference/cloud/messaging-service/v1.json
31+
32+
# V1 Universes
33+
https://github.com/Roblox/creator-docs/blob/main/content/en-us/reference/cloud/universes-api/v1.json
34+
```
35+
36+
### Vendor Extensions
37+
38+
Roblox uses [specification extensions](https://spec.openapis.org/oas/v3.0.4#specification-extensions) to extend the OpenAPI specification. These extensions represent information that the specification doesn't capture by default. Extensions may appear throughout the file where allowed by the OpenAPI specification.
39+
40+
The majority of these specification extensions are experimental. The extensions used are subject to change without notice in favor of fields found within the official OpenAPI specification.
41+
42+
<Alert severity="info">
43+
The OpenAPI descriptions for V1 and V2 resources utilitize distinct specification extensions due to underlying implementation differences.
44+
</Alert>
45+
46+
**V1 Resource Specification Extensions**
47+
48+
| Extension | Location | Description |
49+
|------------------------------------------------- |------------------ |------------------------------------------------------------------------------------------------- |
50+
| `x-roblox-cloud-api-operation` | Operation Object | Boolean. Whether the operation is an Open Cloud operation. |
51+
| `x-roblox-cloud-api-operation-name` | Operation Object | String. The name of the operation. |
52+
| `x-roblox-cloud-api-operation-code-samples` | Operation Object | Object. A list of code samples, an object with the language/title and the corresponding script. |
53+
| `x-roblox-cloud-api-operation-throttling-limit` | Operation Object | Object. The throttling limits for the operation. |
54+
55+
**V2 Resource Specification Extensions**
56+
57+
| Extension | Location | Description |
58+
|--------------------------------------- |------------------ |--------------------------------------------------------------------------------------------------------------- |
59+
| `x-categories` | OpenAPI Object | List of strings. All resource categories. |
60+
| `x-visibility` | Operation Object | Boolean. The visibility of the operation. |
61+
| `x-roblox-docs` | Operation Object | Object. Associates an operation with a category and resource. |
62+
| `x-long-running-operation-parameters` | Operation Object | Object. References the metadata and response for the operation's long running response. |
63+
| `x-oneOf` | Schema Object | Object. Each field contains a list of properties in the schema. Only one of the properties should be present. |
64+
| `x-resource` | Schema Object | Boolean. Whether the schema is a resource. |
65+
| `x-immutable` | Schema Object | Boolean. Whether the schema is immutable. |

content/en-us/production/promotion/referral-system.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function onPlayerAdded(player)
5757
local referredByPlayerId = joinData.ReferredByPlayerId
5858

5959
-- Check if the player was invited through a referral
60-
if referredByPlayerId then
60+
if referredByPlayerId and referredByPlayerId ~= 0 then
6161
-- Fire the referral event to the client, passing the inviter's ID
6262
referrerEvent:FireClient(player, referredByPlayerId)
6363

@@ -88,7 +88,7 @@ function onPlayerAdded(player)
8888
local referredByPlayerId = joinData.ReferredByPlayerId
8989

9090
-- Check if the player was invited through a referral
91-
if referredByPlayerId then
91+
if referredByPlayerId and referredByPlayerId ~= 0 then
9292
-- Fire the referral event to the client, passing the inviter's ID
9393
referrerEvent:FireClient(player, referredByPlayerId)
9494

@@ -130,7 +130,7 @@ function onPlayerAdded(player)
130130
local referredByPlayerId = joinData.ReferredByPlayerId
131131

132132
-- Check if the player was invited and has not already used a referral
133-
if referredByPlayerId and not referredPlayers[player.UserId] then
133+
if referredByPlayerId and referredByPlayerId ~= 0 and not referredPlayers[player.UserId] then
134134
-- Mark the player as referred
135135
referredPlayers[player.UserId] = true
136136

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Open Cloud Reference
22

3-
The Open Cloud V2 reference documentation at [https://create.roblox.com/docs/cloud/reference](https://create.roblox.com/docs/cloud/reference) is rendered from `cloud.docs.json`. This file uses a custom JSON format that is similar, but not identical to the OpenAPI Specification (OAS).
3+
The Open Cloud V2 reference documentation at [https://create.roblox.com/docs/cloud/reference](https://create.roblox.com/docs/cloud/reference) is rendered from `cloud.docs.json`. This file uses OpenAPI specification (OAS) version 3.0.4.
44

55
- Because the content in `cloud.docs.json` is generated from source files, we don't accept pull requests on it.
66
- We **do** accept pull requsts on the V1 reference documentation, but formatting the content and modifying the `curl` commands can be a real challenge.

0 commit comments

Comments
 (0)