api-version 0.3.8

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"]

nightly := `rustc --version | grep -oE '[0-9]{4}-[0-9]{2}-[0-9]{2}' | sed 's/^/nightly-/'`

check:
    cargo check --tests

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

fmt:
    cargo +{{ nightly }} fmt
    RUST_LOG=error taplo fmt

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

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