Repository navigation
Conversation
… initialization The parameters of a route come from its path, query and PagePosition arguments, mirroring the arguments winter.web maps from the request, so the global list of route parameter inspectors and its registration are gone. Type inspectors and @global_exception stay: they are metadata about types. register_type_inspector becomes the decorator @type_inspector, and register_global_exception is gone. winter.openapi.initialization is gone: its marks of Winter's own exceptions as global no longer affected the check of @raises, which looks at the application's definitions only, and Page already had its inspector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #350.
What
PagePosition), mirroring the arguments thatwinter.webmaps from the request since feat(web)!: resolve arguments from the request or the application's injector #345. Gone:register_route_parameters_inspector,get_route_parameters_inspectors, and the exports ofRouteParametersInspector, the three inspectors andinspect_page. A parameter that no argument stands for, such as a header read by a request-scoped provider, is added to the spec thatgenerate_openapireturns.register_type_inspectorbecomes the decorator@winter.openapi.type_inspector(T), without the call form withfunc=. Type inspectors stay global, like JSON encoders: they describe a type and its subclasses wherever it appears, in a body, a response or a parameter.register_global_exceptionis gone;@winter.openapi.global_exceptionremains as the only name of that annotation.winter.openapi.initializationis gone. Its four marks of Winter's own exceptions as global no longer affected anything: the check of@raiseslooks at the definitions of the application only, where Winter's classes are not.Pagewas registered twice. All tests pass without them.docs/architecture.md: OpenAPI type inspectors join the metadata that may be global; the deviations no longer listwinter.openapi.Why
The route parameter inspectors were the only behavioural registry of
winter.openapi, and they describe whatwinter.webmaps, which is now fixed. Decorators in Winter name what a thing is (@route_get,@problem,@global_exception);register_…named the mechanism.To be confirmed on the consumer: whether it registers route parameter inspectors, subclasses
RouteParametersInspector, or callsregister_global_exception.🤖 Generated with Claude Code