Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,4 @@ dmypy.json

# IDE
.idea/
.vscode/
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Register ThrottleException as a global to simplify projects without throttling

## [10.0.0]

- Delete @winter.web.controller
Expand Down
2 changes: 2 additions & 0 deletions winter_openapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from enum import Enum

from winter.data.pagination import Page
from winter.web.exceptions import ThrottleException
from winter.web.pagination.limits import MaximumLimitValueExceeded
from .annotations import global_exception
from .annotations import register_global_exception
Expand All @@ -24,6 +25,7 @@ def setup(allow_missing_raises_annotation: bool = False):
from .page_inspector import inspect_page

register_global_exception(MaximumLimitValueExceeded)
register_global_exception(ThrottleException)
hinting_type_info.insert(0, (Enum, inspect_enum_class))
register_type_inspector(Page, func=inspect_page)
register_route_parameters_inspector(PathParametersInspector())
Expand Down