Skip to content
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

Feat: Different response schemas for different status codes #1431

Merged
merged 48 commits into from
Jan 4, 2024

Conversation

RobinTail
Copy link
Owner

Instead of #1401

According to discussions #1193 , #1332 and #824

I'm trying here to enable consumers to declare slightly different schemas for various HTTP status codes.
So far, it used to be only one pair, but configurable (200 and 400 by default for positive and negative accordingly).

@RobinTail RobinTail added enhancement New feature or request refactoring The better way to achieve the same result labels Dec 31, 2023
@coveralls
Copy link

coveralls commented Dec 31, 2023

Coverage Status

coverage: 100.0%. remained the same
when pulling a17aab6 on better-status-codes2
into 312f300 on master.

@RobinTail RobinTail force-pushed the better-status-codes2 branch from c0c24b3 to a21ed8f Compare January 1, 2024 00:57
@RobinTail RobinTail marked this pull request as ready for review January 1, 2024 01:00
@RobinTail RobinTail changed the title Feat: Multiple status codes (2) Feat: Different response schemas for different status codes Jan 1, 2024
src/index.ts Show resolved Hide resolved
src/result-handler.ts Outdated Show resolved Hide resolved
src/endpoint.ts Outdated Show resolved Hide resolved
@RobinTail RobinTail added the documentation Improvements or additions to documentation label Jan 1, 2024
@RobinTail
Copy link
Owner Author

✅ regression test passed

@RobinTail RobinTail added the miracle Mysterious events are happening here label Jan 3, 2024
Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

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

ok

@RobinTail
Copy link
Owner Author

✅ QA passed (see discussions)

Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

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

ready

@RobinTail RobinTail merged commit 89af4ff into master Jan 4, 2024
11 checks passed
@RobinTail RobinTail deleted the better-status-codes2 branch January 4, 2024 16:51
@RobinTail RobinTail mentioned this pull request May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request miracle Mysterious events are happening here refactoring The better way to achieve the same result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants