Skip to content

docs: ritza july edits #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Jul 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
55989aa
Edit: Resource configuration
bethh0rn Jul 16, 2025
b3c51c3
Edit: Provider configuration
bethh0rn Jul 16, 2025
0a46db1
Edit: Custom code regions in Python
bethh0rn Jul 16, 2025
b41bff8
Edit: Custom code regions in TypeScript
bethh0rn Jul 16, 2025
a4ecfa0
Edit: Custom code regions in Java
bethh0rn Jul 16, 2025
85303c4
Edit: Custom end-to-end API contract tests with Arazzo
bethh0rn Jul 21, 2025
074f99e
Edit import descriptions
bethh0rn Jul 21, 2025
8942059
Edit import description
bethh0rn Jul 21, 2025
2a49e04
Edit imports description
bethh0rn Jul 21, 2025
856b467
Proofread
bethh0rn Jul 21, 2025
2178328
Update MCP terms
bethh0rn Jul 21, 2025
6bf8d91
Proofread mcp/ai-agents/introduction.mdx
bethh0rn Jul 21, 2025
a1822f5
Proofread mcp/ai-agents/real-world-examples.mdx
bethh0rn Jul 21, 2025
c3d69cc
Proofread mcp/building-servers/building-fastapi-server.mdx
bethh0rn Jul 21, 2025
b000be5
Proofread protocol-deep-dive.mdx
bethh0rn Jul 21, 2025
6208f66
Proofread protocol-reference/tools.mdx
bethh0rn Jul 21, 2025
cc333d8
Proofread mcp/using-mcp/remote-servers.mdx
bethh0rn Jul 21, 2025
b3a79c1
Merge pull request #59 from ritza-co/edit-java-code-region
bethh0rn Jul 22, 2025
9fdbedf
Merge pull request #64 from ritza-co/edit-python-code-region
bethh0rn Jul 22, 2025
6df3277
Merge pull request #63 from ritza-co/edit-typescript-code-region
bethh0rn Jul 22, 2025
709308e
Merge pull request #61 from ritza-co/edit-provider-config
bethh0rn Jul 22, 2025
98f9de1
Merge pull request #60 from ritza-co/edit-resource-config
bethh0rn Jul 22, 2025
d3a4f60
Merge pull request #62 from ritza-co/edit-api-contract-tests
bethh0rn Jul 22, 2025
3bc5769
Correct line 90, introduction.mdx
bethh0rn Jul 22, 2025
7a0887e
Update Claude name in mermaid, real-world-examples.mdx
bethh0rn Jul 22, 2025
f61dcce
Remove comma, optimizing-openapi.mdx
bethh0rn Jul 22, 2025
8f6c14d
Fix typo, protocol-deep-dive.mdx
bethh0rn Jul 22, 2025
c66b478
Fix typo, tools.mdx
bethh0rn Jul 22, 2025
9cf833c
Update installing-mcp-servers.mdx
bethh0rn Jul 22, 2025
77d8c91
Merge pull request #65 from ritza-co/july-grammarlies
bethh0rn Jul 22, 2025
4fc6e09
Merge branch 'main' into july-edits
rideam Jul 23, 2025
8249f53
Proofread merge, resource-configuration.mdx
bethh0rn Jul 23, 2025
d2137e4
Merge branch 'main' into july-edits
rideam Jul 24, 2025
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
29 changes: 14 additions & 15 deletions docs/customize/code/code-regions/java.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Custom code regions in Java
title: Custom Code Regions in Java
description: "Learn how to use custom code regions in Java SDKs."
---

# Custom code regions in Java

To enable custom code regions for Java SDKs, update the project's
`.speakeasy/gen.yaml` file like so:
`.speakeasy/gen.yaml` file as follows:

```diff .speakeasy/gen.yaml
configVersion: 2.0.0
Expand All @@ -19,8 +19,7 @@ java:

## Full example

The Speakeasy examples repository has a [full example](https://github.com/speakeasy-api/examples/tree/main/customcode-sdkclasses-java) of a Java SDK
that uses custom code regions.
The Speakeasy examples repository includes a [full Java SDK](https://github.com/speakeasy-api/examples/tree/main/customcode-sdkclasses-java) that uses custom code regions.

## Regions

Expand All @@ -30,22 +29,22 @@ Below are the available code regions in Java SDKs.

Java SDK classes can have two code regions:

- `// #region imports` - allows the addition of imports to an SDK file needed for
custom methods and properties. This region must be located at the top of the
- `// #region imports`: The imports region allows you to add imports to an SDK file needed for
custom methods and properties. It must be located at the top of the
file alongside generated imports.
- `// #region class-body` - allows the addition of custom methods and
properties to an SDK class. This region must be located in the body of a Java
- `// #region class-body`: The class-body region allows you to add custom methods and
properties to an SDK class. It must be located in the body of a Java
SDK class alongside generated methods and properties.

### Model classes

Java model classes can also have custom code regions:

- `// #region imports` - allows the addition of imports to a model file needed for
custom methods and properties. This region must be located at the top of the
- `// #region imports`: The imports region allows you to add imports to a model file needed for
custom methods and properties. It must be located at the top of the
file alongside generated imports.
- `// #region class-body` - allows the addition of custom methods and
properties to a model class. This region must be located in the body of a Java
- `// #region class-body`: The class-body region allows you to add custom methods and
properties to a model class. It must be located in the body of a Java
model class alongside generated methods and properties.

## Managing dependencies
Expand All @@ -61,7 +60,7 @@ java:
- testImplementation:org.mockito:mockito-core:5.1.1
```

This ensures dependencies persist across SDK regenerations and are properly included in the generated `build.gradle`.
This ensures that dependencies persist across SDK regenerations and are properly included in the generated `build.gradle`.

```java src/main/java/com/example/sdk/Todos.java
/*
Expand Down Expand Up @@ -116,7 +115,7 @@ public class Todos implements

## Model class example

You can also add custom methods to model classes. Here's an example of adding a `render()` method to a `Todo` model class:
You can also add custom methods to model classes. This example adds a `render()` method to a `Todo` model class:

```java src/main/java/com/example/sdk/models/components/Todo.java
/*
Expand Down Expand Up @@ -203,7 +202,7 @@ public class Todo {
}
```

This allows you to use the custom method like so:
This allows you to use the custom method as follows:

```java
Todo todo = ...;
Expand Down
17 changes: 8 additions & 9 deletions docs/customize/code/code-regions/python.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Custom code regions in Python
title: Custom Code Regions in Python
description: "Learn how to use custom code regions in Python SDKs."
---

# Custom code regions in Python

To enable custom code regions for Python SDKs, update the project's
`.speakeasy/gen.yaml` file like so:
`.speakeasy/gen.yaml` file as follows:

```diff .speakeasy/gen.yaml
configVersion: 2.0.0
Expand All @@ -19,8 +19,7 @@ python:

## Full example

The Speakeasy examples repository has a [full example](https://github.com/speakeasy-api/examples/tree/main/customcode-sdkclasses-python) of a Python SDK
that uses custom code regions.
The Speakeasy examples repository includes a [full Python SDK](https://github.com/speakeasy-api/examples/tree/main/customcode-sdkclasses-python) that uses custom code regions.


## Regions
Expand All @@ -31,11 +30,11 @@ Below are the available code regions in Python SDKs.

Python SDK classes can have two code regions:

* `# region imports` - allows the addition of imports to an SDK file needed for
custom methods and properties. This region must be located at the top of the
* `# region imports`: The imports region allows you to add imports to an SDK file needed for
custom methods and properties. It must be located at the top of the
file alongside generated imports.
* `# region sdk-class-body` - allows the addition of custom methods and
properties to an SDK class. This region must be located in the body of a Python
* `# region sdk-class-body`: The class-body region allows you to add custom methods and
properties to an SDK class. It must be located in the body of a Python
SDK class alongside generated methods and properties.

## Managing dependencies
Expand All @@ -53,7 +52,7 @@ python:
black: "^23.0.0"
```

This ensures dependencies persist across SDK regenerations and are properly included in the generated `pyproject.toml`.
This ensures that dependencies persist across SDK regenerations and are properly included in the generated `pyproject.toml`.

```python src/todos_sdk/todos.py
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
Expand Down
17 changes: 8 additions & 9 deletions docs/customize/code/code-regions/typescript.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Custom code regions in TypeScript
title: Custom Code Regions in TypeScript
description: "Learn how to use custom code regions in TypeScript SDKs."
---

# Custom code regions in TypeScript

To enable custom code regions for TypeScript SDKs, update the project's
`.speakeasy/gen.yaml` file like so:
`.speakeasy/gen.yaml` file as follows:

```diff .speakeasy/gen.yaml
configVersion: 2.0.0
Expand All @@ -19,8 +19,7 @@ typescript:

## Full example

The Speakeasy examples repository has a [full example](https://github.com/speakeasy-api/examples/tree/main/customcode-sdkclasses-typescript) of a TypeScript
SDK that uses custom code regions.
The Speakeasy examples repository includes a [full TypeScript SDK](https://github.com/speakeasy-api/examples/tree/main/customcode-sdkclasses-typescript) that uses custom code regions.


## Regions
Expand All @@ -31,11 +30,11 @@ Below are the available code regions in TypeScript SDKs.

TypeScript SDK classes can have two code regions:

* `// #region imports` - allows the addition of imports to an SDK file needed for
custom methods and properties. This region must be located at the top of the
* `// #region imports`: The imports region allows you to add imports to an SDK file needed for
custom methods and properties. It must be located at the top of the
file alongside generated imports.
* `// #region sdk-class-body` - allows the addition of custom methods and
properties to an SDK class. This region must be located in the body of a TypeScript
* `// #region sdk-class-body`: The class-body region allows you to add custom methods and
properties to an SDK class. It must be located in the body of a TypeScript
SDK class alongside generated methods and properties.

## Managing dependencies
Expand All @@ -54,7 +53,7 @@ typescript:
react: "^18.0.0"
```

This ensures dependencies persist across SDK regenerations and are properly included in the generated `package.json`.
This ensures that dependencies persist across SDK regenerations and are properly included in the generated `package.json`.

```typescript src/sdk/todos.ts
/*
Expand Down
Loading
Loading