oasgen 0.24.1

Generates OpenAPI 3.0 spec based on Rust code. Works with axum, actix-web, or independent of a web framework.
Documentation
set dotenv-load := true
set positional-arguments
set export

help:
    @just --list --unsorted

build *ARGS:
    cargo build "$@"
alias b := build

check:
    cargo check
alias c := check

fix:
    cargo clippy --fix

run *ARGS:
    cargo run --example actix --features actix

test *ARGS:
    cargo test --all-features "$ARGS"

alias r := run

doc:
    RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps --open

expand-run:
    printf '#![allow(unused)]\n' > examples/expand.rs
    printf '#![feature(fmt_internals)]\n' >> examples/expand.rs
    printf '#![feature(fmt_helpers_for_derive)]\n' >> examples/expand.rs
    printf '#![feature(print_internals)]\n' >> examples/expand.rs
    printf '#![feature(core_panic)]\n' >> examples/expand.rs
    cargo expand --all-features --example test >> examples/expand.rs
    sd '::alloc::' '::std::' examples/expand.rs -f
    sd '# ?\[serde.*' '' examples/expand.rs -f
    sd '# ?\[oasgen.*' '' examples/expand.rs -f
    sd -s '#[rustc_box]' '' examples/expand.rs -f
    @just rerun
alias er := expand-run

rerun:
    cargo +nightly run --all-features --example expand
alias rr := expand-run