api-version 0.3.3

Axum middleware to add a version prefix to request paths based on a set of versions and an optional `x-api-version` header
Documentation
set shell := ["bash", "-uc"]

rust_version := `grep channel rust-toolchain.toml | sed -r 's/channel = "(.*)"/\1/'`
nightly := "nightly-2025-10-29"

check:
	cargo check --tests

fmt:
    cargo +{{nightly}} fmt

fmt-check:
    cargo +{{nightly}} fmt --check

fix:
	cargo fix --tests --allow-dirty --allow-staged

lint:
	cargo clippy --tests --no-deps -- -D warnings

lint-fix:
	cargo clippy --tests --no-deps --allow-dirty --allow-staged --fix

test:
	cargo test --tests

doc:
	cargo doc --no-deps

all: check fmt lint test doc