-
Notifications
You must be signed in to change notification settings - Fork 28
fix(133,137): correct Create/Apply HTTP response codes to 201 #406
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
toumorokoshi
merged 11 commits into
aep-dev:main
from
thegagne:fix/create-apply-response-codes
Jul 25, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e0cc8e3
fix(133,137): correct Create/Apply HTTP response codes to 201
thegagne 2e66397
fix: remove RFC 7231 footnote links from notes
thegagne 52d31de
fix: remove notes, keep status code guidance only
thegagne 34582b0
fix: use must for 201 response code guidance
thegagne 9b002ee
fix(231): change batchGet to batch-get for casing consistency across …
kjvalencik 6d64464
chore: add AGENTS.md (#409)
toumorokoshi 8d2b468
Remove Dan Hudlow's organization (IBM) (#411)
hudlow a4305d0
aep-136: clarify and fix kebab-case usage in custom method URIs (#410)
toumorokoshi 707e66c
fix(0004): use snake case for pattern variable (#414)
kindermoumoute 5e6d0d3
chore(scripts): make build.sh compatible with Bash 3.2 (#420)
toumorokoshi 7de0fe2
fix bad reference
toumorokoshi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,152 @@ | ||
| # AGENTS.md | ||
|
|
||
| This repository contains the **API Enhancement Proposals (AEPs)** — the design | ||
| specification documents for the [AEP project](https://aep.dev). It is a | ||
| content-driven repository: the primary artifacts are Markdown/Jinja2 documents | ||
| and YAML metadata, not application code. | ||
|
|
||
| ## Repository layout | ||
|
|
||
| ``` | ||
| aep/general/<NNNN>/ # One directory per AEP (zero-padded, 4-digit number) | ||
| aep.yaml # AEP metadata (id, state, slug, category, etc.) | ||
| aep.md.j2 # AEP content (Markdown + Jinja2 template syntax) | ||
| config/ # Site configuration (hero, header, urls, site) | ||
| scripts/ # Tooling: fix.py, validate_links.py, build.sh, serve.sh | ||
| pages/general/ # Static site pages (adopting, faq, licensing, etc.) | ||
| blog/ # Blog posts | ||
| .github/workflows/ # CI: lint.yaml, test.yaml, publish_site.yaml | ||
| ``` | ||
|
|
||
| ## AEP file structure | ||
|
|
||
| Every AEP lives in `aep/general/<NNNN>/` and contains exactly two files: | ||
|
|
||
| ### `aep.yaml` — metadata | ||
|
|
||
| Required fields: | ||
|
|
||
| - `id`: integer AEP number (no zero-padding) | ||
| - `state`: one of `draft`, `reviewing`, `approved`, `final`, `replaced`, | ||
| `withdrawn` | ||
| - `slug`: URL-friendly short name | ||
| - `created`: ISO-8601 date (`yyyy-mm-dd`) | ||
| - `placement.category`: one of `meta`, `general`, `resources`, | ||
| `standard-methods`, `fields`, `types`, `design-patterns`, `batch-methods`, | ||
| `best-practices`, `protobuf` | ||
|
|
||
| Optional fields: `updated`, `placement.order`, `redirect_from`, `js_scripts`. | ||
|
|
||
| ### `aep.md.j2` — content | ||
|
|
||
| Markdown with Jinja2 template directives. Key conventions: | ||
|
|
||
| - Starts with a single `#` title (a noun, not an imperative). | ||
| - Introduction paragraph (no heading) → `## Guidance` section. | ||
| - Optional trailing sections in order: `## Rationale`, `## History`, | ||
| `## Further reading`, `## Changelog`. | ||
| - Only use heading levels `##` and `###` (never `#` beyond the title). | ||
| - Use RFC-2119 keywords (`**must**`, `**should**`, `**may**`) in lower-case | ||
| bold. | ||
| - Use `{% tab proto %}` / `{% tab oas %}` / `{% endtabs %}` for | ||
| protocol-specific examples. | ||
| - Use `{% sample '<path>', '<selector>' %}` to include code from example files. | ||
| - Cross-reference AEPs as `AEP-N` (no zero-padding) in prose, with links using | ||
| relative paths like `./0008.md` or `../0008.md`. | ||
| - Links must NOT end in `.md` (the linter strips `.md` suffixes). Exception: | ||
| external GitHub links. | ||
| - Do not use self-reference links like `[aep-123][aep-123]` — use plain text. | ||
| - Do not use reference-style links with AEP identifiers like | ||
| `[aep-123]: ./0123`. | ||
| - Wrap reference-style link definitions that would break prettier in | ||
| `<!-- prettier-ignore-start -->` / `<!-- prettier-ignore-end -->` blocks. | ||
|
|
||
| ## Formatting and linting | ||
|
|
||
| Formatting is enforced by CI. Always run before committing: | ||
|
|
||
| ```bash | ||
| make lint | ||
| ``` | ||
|
|
||
| This runs three checks: | ||
|
|
||
| 1. **Prettier** (`npm run check`): Markdown/YAML/JSON formatting. | ||
| - `printWidth: 79`, `proseWrap: always`, `singleQuote: true`, | ||
| `trailingComma: es5`. | ||
| - `.md.j2` files are parsed as Markdown. | ||
| 2. **`scripts/fix.py`**: Validates and fixes AEP-specific link rules. | ||
| - No `.md` suffixes in internal links. | ||
| - All AEP cross-references point to existing AEPs. | ||
| - No self-reference links, no AEP-identifier reference-style links. | ||
| - HTTP URLs are well-formed. | ||
| 3. **`scripts/validate_links.py`**: Read-only link validation (same rules as | ||
| fix.py but never modifies files). | ||
|
|
||
| Use `make check` for a read-only lint pass (CI uses this). | ||
|
|
||
| ## Development | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - Node.js + npm | ||
| - Python 3 | ||
|
|
||
| ### Install dependencies | ||
|
|
||
| ```bash | ||
| make install # runs npm install | ||
| ``` | ||
|
|
||
| ### Local preview | ||
|
|
||
| ```bash | ||
| ./scripts/serve.sh | ||
| ``` | ||
|
|
||
| This clones the [site-generator](https://github.com/aep-dev/site-generator) (if | ||
| not already present as a sibling directory), builds the site, and starts a dev | ||
| server on port 4321. | ||
|
|
||
| ### Build | ||
|
|
||
| ```bash | ||
| ./scripts/build.sh | ||
| ``` | ||
|
|
||
| Builds the full site including the site-generator, api-linter, and | ||
| aep-openapi-linter (uses sibling directories if present, otherwise clones to | ||
| `/tmp`). | ||
|
|
||
| ## CI workflows | ||
|
|
||
| | Workflow | Trigger | What it does | | ||
| | ------------------- | ----------- | ------------------------------------------------- | | ||
| | `lint.yaml` | PR → main | `make check` (prettier + fix.py + validate_links) | | ||
| | `test.yaml` | PR → main | `./scripts/build.sh` (full site build) | | ||
| | `publish_site.yaml` | push → main | Triggers site-generator repository dispatch | | ||
|
|
||
| ## Content conventions | ||
|
|
||
| - AEPs should be concise — roughly two printed pages. | ||
| - A single AEP covers a single topic. | ||
| - API design examples should be presented in both OpenAPI (OAS 3.1) and | ||
| protocol buffers. | ||
| - Use snake_case for parameter and property names in examples. | ||
| - Error codes in prose use the format `{error_code} / {http_status_code}` (e.g. | ||
| `OK / 200`). | ||
| - Example files (`example.oas.yaml`, `example.proto`) in `aep/general/` are | ||
| code-generated by [aepc](https://github.com/aep-dev/aepc) — do not edit them | ||
| by hand. | ||
|
|
||
| ## Common pitfalls | ||
|
|
||
| - **Don't link to `.md` files** in AEP content (except external GitHub links). | ||
| Links like `./0131.md` will be auto-fixed to `./0131` by `fix.py`, but will | ||
| fail `make check`. | ||
| - **Don't forget `make lint`** before committing. Prettier reformats prose | ||
| wrapping at 79 columns, and fix.py catches link issues. | ||
| - **Don't edit `example.oas.yaml` or `example.proto`** — these are generated | ||
| from aepc. | ||
| - **Zero-pad directory names** but not prose references. Directory: `0008/`. | ||
| Prose: `AEP-8`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.