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

Validate that http.code is between 100 and 999 #1156

Merged
merged 1 commit into from
Mar 24, 2022
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/source/1.0/spec/core/http-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ The ``http`` trait is a structure that supports the following members:
* - code
- ``integer``
- The HTTP status code of a successful response. Defaults to ``200`` if
not provided.
not provided. The provided value SHOULD be between 100 and 599, and
it MUST be between 100 and 999.

The following example defines an operation that uses HTTP bindings:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ structure http {
/// The HTTP status code of a successful response.
///
/// Defaults to 200 if not provided.
code: PrimitiveInteger,
@range(min: 100, max: 999)
code: Integer,
}

/// Binds an operation input structure member to an HTTP label.
Expand Down