From 4769ad9df18ee824518e1f1ffc65469013911c10 Mon Sep 17 00:00:00 2001 From: fa-sharp Date: Thu, 19 Feb 2026 15:54:08 -0500 Subject: [PATCH] Fix Jinja2 template syntax formatting --- Cargo.toml | 13 ++++++++----- README.md | 14 +++++++------- src/config.rs | 3 ++- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6c48186..536d102 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,23 +5,26 @@ edition = "2021" description = "{{project-description}}" [dependencies] -{% if include_aide %}aide = { version = "0.16.0-alpha.1", features = [ +{% if include_aide %} +aide = { version = "0.16.0-alpha.1", features = [ "axum", "axum-json", "axum-query", ] } -{% endif %}anyhow = "1.0.101" +{% endif %} +anyhow = "1.0.101" axum = { version = "0.8.8", features = ["json", "query"] } axum-app-wrapper = { git = "https://gitea.fasharp.io/fa-sharp/axum-app-wrapper", rev = "a8d5e4f962" } -{% if include_aide %}schemars = { version = "1.0", features = [ +dotenvy = "0.15.7" +figment = { version = "0.10.19", features = ["env"] } +{% if include_aide %} +schemars = { version = "1.0", features = [ "chrono04", "preserve_order", "url2", "uuid1" ] } {% endif %} -dotenvy = "0.15.7" -figment = { version = "0.10.19", features = ["env"] } serde = "1.0.228" serde_json = "1.0.145" tokio = { version = "1.48.0", default-features = false, features = [ diff --git a/README.md b/README.md index 8a8fe1f..b87d5d9 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ A production-ready template for building web services with Rust and Axum. ## Features -- 🚀 **Axum** - Fast and ergonomic web framework -- ⚙️ **Configuration Management** - Environment-based config with `figment` -- 📝 **Structured Logging** - JSON logging in production with `tracing` -- 🔄 **Graceful Shutdown** - Handles SIGTERM and SIGINT signals -- 🏗️ **Plugin Architecture** - Modular app initialization with `axum-app-wrapper` -- 🔌 **Optional OpenAPI** - API documentation with `aide` (optional) +- **Axum** - Fast and ergonomic web framework +- **Configuration Management** - Environment-based config with `figment` +- **Structured Logging** - JSON logging in production with `tracing` +- **Graceful Shutdown** - Handles SIGTERM and SIGINT signals +- ️**Plugin Architecture** - Modular app initialization with `axum-app-wrapper` +- **Optional OpenAPI** - API documentation with `aide` (optional) ## Usage @@ -108,4 +108,4 @@ pub async fn create_app() -> anyhow::Result<(axum::Router, AppConfig, impl Futur ## License -Configure your license as needed. \ No newline at end of file +Configure your license as needed. diff --git a/src/config.rs b/src/config.rs index 60f5d3e..565d934 100644 --- a/src/config.rs +++ b/src/config.rs @@ -2,7 +2,8 @@ use std::net::{IpAddr, Ipv4Addr}; use anyhow::Context; use axum_app_wrapper::AdHocPlugin; -{% if include_aide %}use schemars::JsonSchema; +{% if include_aide %} +use schemars::JsonSchema; {% endif %} use serde::Deserialize;