Skip to content

Fail by name when the spec adds a grant context or input type - #23

Merged
chrisjkuch merged 1 commit into
organization-membersfrom
enum-coverage-tests
Nov 24, 2026
Merged

chrisjkuch merged 1 commit into
organization-membersfrom
enum-coverage-tests

Conversation

@chrisjkuch

@chrisjkuch chrisjkuch commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #22.

Applies the enum-coverage rule from #21 to the two remaining tests that miss new spec values.

Changes

  • TestVariantDiscrimination lists the expected variant for every PermissionGrantEntityType (none for any), covers all 15 contexts instead of 3, and fails by name when the enum gains a type the table doesn't list.
  • The InputType contract test checks that its hardcoded values match the generated enum.

Notes

Stacked on #21; retarget to main after it merges.

🤖 Generated with Claude Code

@chrisjkuch
chrisjkuch added this pull request to stack #24 November 24, 2026 09:46
The variant test now lists the expected variant for every
PermissionGrantEntityType and checks the list covers the enum, and the
InputType contract test checks its values match the generated enum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chrisjkuch

Copy link
Copy Markdown
Collaborator Author

I wanted to make sure that when codegen pulls in new entity types from an updated OpenAPI spec that tests fail until we have test coverage for those entity types.

@chrisjkuch
chrisjkuch merged commit 97b6594 into main Nov 24, 2026
8 of 16 checks passed
@chrisjkuch
chrisjkuch deleted the enum-coverage-tests branch November 24, 2026 10:10
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.

Fail by name when the spec adds a grant context or input type

1 participant