You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generator currently only creates one big OpenAPI Handler protocol.
This makes it hard to organize the routes.
Proposed solution
Create a different OpenAPI Handler for each "tag" so we have something close to Vapor "controllers".
These are quite useful for decluttering the code.
The generator could also generate each tag's "controller protocol" in it's own file. There are known issues in the Swift compiler where it struggles to handle one big file, or makes builds potentially extremely slower.
Alternatives considered
Manually handling this by different methods, including manually creating controllers and redirecting the routes in the main openapi handler to those controllers, or using multiple targets and filtering a shared openapi file based on tag in each controller.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Motivation
The generator currently only creates one big OpenAPI Handler protocol.
This makes it hard to organize the routes.
Proposed solution
Create a different OpenAPI Handler for each "tag" so we have something close to Vapor "controllers".
These are quite useful for decluttering the code.
The generator could also generate each tag's "controller protocol" in it's own file. There are known issues in the Swift compiler where it struggles to handle one big file, or makes builds potentially extremely slower.
Alternatives considered
Manually handling this by different methods, including manually creating controllers and redirecting the routes in the main openapi handler to those controllers, or using multiple targets and filtering a shared openapi file based on tag in each controller.
Additional information
No response
The text was updated successfully, but these errors were encountered: