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
15 changes: 15 additions & 0 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cliVersion": "5.50.1",
"generatorName": "fernapi/fern-go-sdk",
"generatorVersion": "1.57.8",
"generatorConfig": {
"packageName": "zep",
"union": "v1"
},
"originGitCommit": "4135f93a8bc65a8ec8f29a261ce0e721b714cc57",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "4.0.0-alpha.1",
"ciProvider": "github",
"sdkVersion": "v4.0.0-alpha.1"
}
16 changes: 16 additions & 0 deletions .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ LICENSE
go.mod
go.sum
.gitattributes
.fern/replay.lock
.fern/replay.yml
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

143 changes: 143 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Contributing

Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project.

## Getting Started

### Prerequisites

- Go 1.21+
- Docker (only required to run wire tests; see [Wire Tests](#wire-tests))

### Installation

Install the project dependencies:

```bash
go mod tidy
```

### Building

Build the project:

```bash
go build ./...
```

### Testing

Run the test suite:

```bash
go test ./...
```

#### Wire Tests

If this SDK includes a `wiremock/` directory, the test suite contains wire tests that exercise the client against a [WireMock](https://wiremock.org/) server. The `go test` command above expects `WIREMOCK_URL` to point at a running WireMock instance.

Start WireMock, run the tests, then tear it down:

```bash
docker compose -f wiremock/docker-compose.test.yml up -d
export WIREMOCK_URL=http://localhost:$(docker compose -f wiremock/docker-compose.test.yml port wiremock 8080 | cut -d: -f2)
go test ./...
docker compose -f wiremock/docker-compose.test.yml down
```

The compose file maps WireMock's container port `8080` to a random host port, which is why `WIREMOCK_URL` is derived from `docker compose ... port` rather than hardcoded.

### Formatting

Format code:

```bash
gofmt -w .
```

Or equivalently:

```bash
go fmt ./...
```

### Vetting

Run the Go vet tool to catch common mistakes:

```bash
go vet ./...
```

## About Generated Code

**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated.

### Generated Files

The following directories contain generated code:
- Most Go files in the project

### How to Customize

If you need to customize the SDK, you have two options:

#### Option 1: Use `.fernignore`

For custom code that should persist across SDK regenerations:

1. Create a `.fernignore` file in the project root
2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax)
3. Add your custom code to those files

Files listed in `.fernignore` will not be overwritten when the SDK is regenerated.

For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code).

#### Option 2: Contribute to the Generator

If you want to change how code is generated for all users of this SDK:

1. The Go SDK generator lives in the [Fern repository](https://github.com/fern-api/fern)
2. Generator code is located at `generators/go-v2/`
3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md)
4. Submit a pull request with your changes to the generator

This approach is best for:
- Bug fixes in generated code
- New features that would benefit all users
- Improvements to code generation patterns

## Making Changes

### Workflow

1. Create a new branch for your changes
2. Make your modifications
3. Run tests to ensure nothing breaks: `go test ./...`
4. Format your code: `gofmt -w .`
5. Vet your code: `go vet ./...`
6. Build the project: `go build ./...`
7. Commit your changes with a clear commit message
8. Push your branch and create a pull request

### Commit Messages

Write clear, descriptive commit messages that explain what changed and why.

### Code Style

This project uses `gofmt` for code formatting. Run `gofmt -w .` before committing to ensure your code meets the project's style guidelines.

## Questions or Issues?

If you have questions or run into issues:

1. Check the [Fern documentation](https://buildwithfern.com)
2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues)
3. Open a new issue if your question hasn't been addressed

## License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project.
Loading
Loading