Skip to content

fix(133,137): correct Create/Apply HTTP response codes to 201#406

Open
thegagne wants to merge 4 commits intoaep-dev:mainfrom
thegagne:fix/create-apply-response-codes
Open

fix(133,137): correct Create/Apply HTTP response codes to 201#406
thegagne wants to merge 4 commits intoaep-dev:mainfrom
thegagne:fix/create-apply-response-codes

Conversation

@thegagne
Copy link
Copy Markdown
Contributor

Summary

  • Create (AEP-133) should return 201 Created, not 200 OK, per RFC 7231 §4.3.3
  • Apply (AEP-137) should return 201 when creating a resource and 200 when updating
  • The aep-2026 release incorrectly specified 200 for both; this corrects that with should-level guidance to allow backwards compatibility
  • Updated example.oas.yaml to reflect correct response codes
  • Added notes in both AEPs explaining the correction and that implementations should accept 200 for backwards compatibility

Test plan

  • Verify rendered AEP-133 responses section shows 201 in the OAS sample
  • Verify rendered AEP-137 responses section shows both 200 and 201 in the OAS sample
  • Confirm note text correctly describes the aep-2026 correction

🤖 Generated with Claude Code

Create should return 201 Created, not 200 OK, per RFC 7231. Apply should
return 201 when creating and 200 when updating. The aep-2026 release
incorrectly specified 200 for both; this corrects that with should-level
guidance to allow backwards compatibility.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thegagne thegagne requested a review from a team as a code owner March 24, 2026 18:44
required: true
responses:
'200':
'201':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these examples are generated via aepc: https://github.com/aep-dev/aepc. It would be great to update that first. But I can do so after to align if that's too much effort.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll give it a shot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aep-dev/aep-lib-go#15 - I think this needs to happen first unless I'm mistaken?

Comment on lines +97 to +100
**Note:** The aep-2026 release incorrectly specified `200 OK` for Create
responses. This guidance corrects that: `201 Created` is the appropriate status
code per [RFC 7231][rfc-7231]. Implementations **should** accept `200` for
backwards compatibility.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should include this, as a convention it would litter the spec with a bunch of footnotes. remove?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The great thing about editions is that the old text lives in the aep-2026 branch.

It might be worth keeping a CHANGELOG of things we've changed, but we can also build that from git logs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the note. It does clutter it so I agree with removing it, I just wanted to prompt all of us to think through how this could be a breaking change in some cases. While we can accept 200 for backward compatibility, new things being created would not necessarily know about that.

I'm not super worried about it at the moment, but this change could have implications for the lib, the linter, aepc, aepbase, etc., and anyone who uses them.

Our user base is not super large right now and so we can get away with making changes like these, which is nice. I think we just press forward, test things out, and fix them where we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants