Skip to content

Instantly share code, notes, and snippets.

@Desiders
Desiders / anchors-validator.js
Created December 17, 2025 18:58
Instrument to detect invalid anchor links in VuePress headers
/**
* Instrument to detect invalid anchor links.
*
* Motivation:
* - Docs has anchor links that assume that they are led to the header, but they differ to generated headers' links;
* - Due to the changes, some links may become invalid, and the script will help you track this;
* - VuePress replace some characters on build stage, for example `й` to `и`. Issue: https://github.com/vuejs/vuepress/blob/9fb4bb00925d9409e6732118e996411c6a82c85d/packages/%40vuepress/shared-utils/src/slugify.ts#L9
*/
import fs from 'fs'
[package]
name = "utoipa_swagger_incorrect_path_example"
version = "0.1.0"
edition = "2021"
[dependencies]
axum = "0.8"
axum-extra = "0.10"
utoipa = { version = "5.3", features = ["axum_extras"] }
utoipa-axum = "0.1"