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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
46 changes: 23 additions & 23 deletions .agents/skills/ep-example-authoring/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,50 @@ Keep examples consistent across languages and versions while preserving the repo

This skill applies to:

- `official/docs/*`
- `official/guides/*`
- `official/docs/responses/*`
- `docs/*`
- `guides/*`
- `docs/responses/*`

## Source Of Truth Priority

When conventions conflict, use this order:

1. Existing `official/docs/curl/current` endpoint/action directory and filename layout.
2. Existing `official/docs/<language>/current` precedent for that endpoint.
1. Existing `docs/curl/current` endpoint/action directory and filename layout.
2. Existing `docs/<language>/current` precedent for that endpoint.
3. Service implementation/tests in official SDK repos under `easypost/easypost-*` on GitHub to verify per-language function names and call shapes.
4. `README.md` conventions in the Development section.
5. Fixture-aligned values from `official/fixtures`.
5. Fixture-aligned values from `fixtures`.

## Repository Structure Rules

- `official/docs/<language>/current` is the authoritative, latest snippet set used by downstream sites.
- `official/docs/<language>/vN` directories preserve old major-version examples.
- `official/docs/responses` is not versioned and does not have a `current` directory.
- `official/guides` contains guide-specific examples and payload assets.
- `docs/<language>/current` is the authoritative, latest snippet set used by downstream sites.
- `docs/<language>/vN` directories preserve old major-version examples.
- `docs/responses` is not versioned and does not have a `current` directory.
- `guides` contains guide-specific examples and payload assets.

## Endpoint Directory And Filename Rules

### Docs snippets

- Place snippets under `official/docs/<language>/current/<endpoint>/<action>.<ext>`.
- Place snippets under `docs/<language>/current/<endpoint>/<action>.<ext>`.
- Endpoint directories use kebab-case path names, matching curl endpoint folder names.
- Action filenames use kebab-case and should match curl script stem.

Examples:

- `official/docs/curl/current/addresses/create-and-verify.sh`
- `official/docs/node/current/addresses/create-and-verify.js`
- `official/docs/python/current/scan-form/list.py`
- `docs/curl/current/addresses/create-and-verify.sh`
- `docs/node/current/addresses/create-and-verify.js`
- `docs/python/current/scan-form/list.py`

### Response snippets

- Place responses under `official/docs/responses/<endpoint>/<action>.json`.
- Place responses under `docs/responses/<endpoint>/<action>.json`.
- Keep response endpoint/action naming aligned with curl endpoint/action naming.

Examples:

- `official/docs/responses/addresses/create.json`
- `official/docs/responses/rates/retrieve-stateless.json`
- `docs/responses/addresses/create.json`
- `docs/responses/rates/retrieve-stateless.json`

## Snippet Content Rules

Expand Down Expand Up @@ -108,7 +108,7 @@ Java package caution:

When a client library releases a new major version:

1. Copy `official/docs/<language>/current` to `official/docs/<language>/v<previous_major>`.
1. Copy `docs/<language>/current` to `docs/<language>/v<previous_major>`.
2. Update only `current` for latest major syntax/usage changes.
3. Keep endpoint/action coverage and naming consistent between versions unless API/library behavior requires divergence.

Expand All @@ -118,7 +118,7 @@ When authoring or changing docs examples, make sure the matching response JSON i

Quick workflow:

1. `cd tools/build_doc_json_responses`
1. `cd dev/build_doc_json_responses`
2. Remove related cassette file(s) in `tests/cassettes` for the response(s) you need to regenerate.
3. Run `just generate` with required API keys (run it twice; first pass records, second pass writes responses):

Expand All @@ -127,12 +127,12 @@ Quick workflow:
just generate
```

4. Copy generated files from `tools/build_doc_json_responses/responses` into `official/docs/responses`.
4. Copy generated files from `dev/build_doc_json_responses/responses` into `docs/responses`.
5. Keep endpoint/action naming aligned between example snippets and response JSON paths.

For complete setup, troubleshooting, and formatting details, see:

- `tools/build_doc_json_responses/README.md`
- `dev/build_doc_json_responses/README.md`

## Consistency Checklist Before Commit

Expand All @@ -151,8 +151,8 @@ For complete setup, troubleshooting, and formatting details, see:
bash test/ensure-current-dirs-exist.sh

# Spot-check endpoint/action parity shape
find official/docs/curl/current -maxdepth 2 -type f | head
find official/docs/responses -maxdepth 2 -type f | head
find docs/curl/current -maxdepth 2 -type f | head
find docs/responses -maxdepth 2 -type f | head
```

## Anti-Patterns
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,3 @@ jobs:
run: just install-ruby
- name: Lint project
run: just lint-ruby
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Check for current dirs in docs
run: ./test/ensure-current-dirs-exist.sh
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ __pycache__
/easycop.yml
/easypost_java_style.xml
/layout_rules.xml
/tools/build_doc_json_responses/responses/
/tools/build_doc_json_responses/tests/cassettes/
/dev/build_doc_json_responses/responses/
/dev/build_doc_json_responses/tests/cassettes/
/phpcs.xml
/style_suppressions.xml
bin
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

## Project Structure

- `community` code snippets contributed from the community. These may include custom workflows, how to integrate EasyPost with other software, etc. These are **unofficial and not supported or maintained by EasyPost**.
- `official` code snippets and examples that are used on EasyPost websites or provided for our user's benefit
- `docs` code snippets that are shown on our [API docs](https://docs.easypost.com). Each language will have its own subdirectory. Within each language directory are versioned directories for that language's client library
- `fixtures` mock data used as fixtures for our client library test suites, tooling, etc
- `guides` code snippets that are used on our [guides page](https://docs.easypost.com/guides/getting-started). Each language will have its own subdirectory
- `carriers` code snippets that are used on our [Carriers](https://docs.easypost.com/carriers) guide pages.
- `dev` contain utilities to help facilitate the code in this repo such as the response and curl snippet generation suites
- `docs` code snippets that are shown on our [API Docs](https://docs.easypost.com). Each language will have its own subdirectory. Within each language directory are versioned directories for that language's client library
- `responses` responses for each supported endpoint of our API. These responses coincide with the example snippets found in the `docs` directory. Each will give you a good idea of what to expect back from the EasyPost API
- `fixtures` mock data used as fixtures for our client library test suites, tooling, etc
- `guides` code snippets that are used on our [Guides](https://docs.easypost.com/guides/getting-started) pages. Each language will have its own subdirectory
- `style_guides` contain the style guides and configs for tooling we use in each public language we support
- `tools` contain utilities to help facilitate the code in this repo such as the response snippet generation suite
- `tools` contain example tools to use while interacting with the EasyPost API

> NOTE: filenames may not match language convention - this is intentional. Our documentation website uses these example snippets and expects folder/filenames to follow a certain templated naming convention.

Expand All @@ -38,7 +38,7 @@ Once installed, run an example like you would any other script or tool for that
When creating or updating examples, follow these baseline rules:

1. Keep snippets minimally viable and focused: import the library, create a client, perform one clear API call, and print/log the result.
2. Preserve cross-language and cross-version consistency. Use existing `official/docs/<language>/current` snippets as precedent and keep endpoint/action naming aligned with curl.
2. Preserve cross-language and cross-version consistency. Use existing `docs/<language>/current` snippets as precedent and keep endpoint/action naming aligned with curl.
3. Use fixture-aligned, open-source sample data only. Do not include real-person or real-business PII.
4. Examples should run as-is with no edits other than replacing placeholder API keys and object IDs.
5. For full standards (directory layout, naming, responses, placeholders, and versioning), see [`.agents/skills/ep-example-authoring/SKILL.md`](.agents/skills/ep-example-authoring/SKILL.md).
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions community/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions community/docs/http_files/README.md

This file was deleted.

100 changes: 0 additions & 100 deletions community/docs/http_files/addresses.http

This file was deleted.

49 changes: 0 additions & 49 deletions community/docs/http_files/api-keys.http

This file was deleted.

Loading
Loading