@@ -42,16 +42,16 @@ mod macros;
42
42
43
43
pub use self :: {
44
44
context:: {
45
- AppContext , CompatSsoContext , ConsentContext , DeviceConsentContext , DeviceLinkContext ,
46
- DeviceLinkFormField , EmailAddContext , EmailRecoveryContext , EmailVerificationContext ,
47
- EmailVerificationPageContext , EmptyContext , ErrorContext , FormPostContext , IndexContext ,
48
- LoginContext , LoginFormField , NotFoundContext , PolicyViolationContext , PostAuthContext ,
49
- PostAuthContextInner , ReauthContext , ReauthFormField , RecoveryExpiredContext ,
50
- RecoveryFinishContext , RecoveryFinishFormField , RecoveryProgressContext ,
51
- RecoveryStartContext , RecoveryStartFormField , RegisterContext , RegisterFormField ,
52
- SiteBranding , SiteConfigExt , SiteFeatures , TemplateContext , UpstreamExistingLinkContext ,
53
- UpstreamRegister , UpstreamRegisterFormField , UpstreamSuggestLink , WithCaptcha , WithCsrf ,
54
- WithLanguage , WithOptionalSession , WithSession ,
45
+ ApiDocContext , AppContext , CompatSsoContext , ConsentContext , DeviceConsentContext ,
46
+ DeviceLinkContext , DeviceLinkFormField , EmailAddContext , EmailRecoveryContext ,
47
+ EmailVerificationContext , EmailVerificationPageContext , EmptyContext , ErrorContext ,
48
+ FormPostContext , IndexContext , LoginContext , LoginFormField , NotFoundContext ,
49
+ PolicyViolationContext , PostAuthContext , PostAuthContextInner , ReauthContext ,
50
+ ReauthFormField , RecoveryExpiredContext , RecoveryFinishContext , RecoveryFinishFormField ,
51
+ RecoveryProgressContext , RecoveryStartContext , RecoveryStartFormField , RegisterContext ,
52
+ RegisterFormField , SiteBranding , SiteConfigExt , SiteFeatures , TemplateContext ,
53
+ UpstreamExistingLinkContext , UpstreamRegister , UpstreamRegisterFormField ,
54
+ UpstreamSuggestLink , WithCaptcha , WithCsrf , WithLanguage , WithOptionalSession , WithSession ,
55
55
} ,
56
56
forms:: { FieldError , FormError , FormField , FormState , ToFormState } ,
57
57
} ;
@@ -324,6 +324,12 @@ register_templates! {
324
324
/// Render the frontend app
325
325
pub fn render_app( WithLanguage <AppContext >) { "app.html" }
326
326
327
+ /// Render the Swagger API reference
328
+ pub fn render_swagger( ApiDocContext ) { "swagger/doc.html" }
329
+
330
+ /// Render the Swagger OAuth2 callback page
331
+ pub fn render_swagger_callback( ApiDocContext ) { "swagger/oauth2-redirect.html" }
332
+
327
333
/// Render the login page
328
334
pub fn render_login( WithLanguage <WithCsrf <LoginContext >>) { "pages/login.html" }
329
335
@@ -423,6 +429,8 @@ impl Templates {
423
429
) -> anyhow:: Result < ( ) > {
424
430
check:: render_not_found ( self , now, rng) ?;
425
431
check:: render_app ( self , now, rng) ?;
432
+ check:: render_swagger ( self , now, rng) ?;
433
+ check:: render_swagger_callback ( self , now, rng) ?;
426
434
check:: render_login ( self , now, rng) ?;
427
435
check:: render_register ( self , now, rng) ?;
428
436
check:: render_consent ( self , now, rng) ?;
0 commit comments