Skip to content

Conversation

@Tuntii
Copy link
Owner

@Tuntii Tuntii commented Dec 31, 2025

No description provided.

Introduces a body size limit middleware to protect against large payload attacks, configurable via the RustApi builder. Adds Prometheus-based metrics middleware (feature-gated) with a /metrics endpoint, and exposes error environment configuration and error IDs for improved error handling and observability. Updates dependencies and public API exports accordingly.
Introduce detailed module-level documentation for core crates, add compile-time and runtime route path validation, and provide property-based tests for path validation. Add CI workflow, changelog, contributing guidelines, dual MIT/Apache-2.0 licenses, and new example applications (auth-api, crud-api). Update workspace and dependencies to include new examples and features.
…agger UI

- JwtLayer now supports skip_paths() to exclude paths from JWT validation
- Added docs_with_auth() for Basic Auth protected documentation
- Updated auth-api example to demonstrate protected docs
- Bumped version to 0.1.2
Copilot AI review requested due to automatic review settings December 31, 2025 03:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Swagger UI Basic Authentication support to protect API documentation in production environments. The primary focus is on enabling authentication for the /docs endpoint while maintaining backward compatibility with the existing unauthenticated documentation feature.

Key Changes:

  • Added docs_with_auth() and docs_with_auth_and_info() methods to RustApi for Basic Auth protected Swagger UI
  • Enhanced JwtLayer with skip_paths() to exclude public endpoints from JWT validation
  • Updated auth-api example to demonstrate protected documentation

Reviewed changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated no comments.

File Description
crates/rustapi-core/src/app.rs Added Basic Auth protected docs methods and helper functions
crates/rustapi-extras/src/jwt/mod.rs Added skip_paths configuration for JWT middleware
examples/auth-api/src/main.rs Demonstrates protected docs with Basic Auth

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tuntii Tuntii merged commit b26ba89 into main Dec 31, 2025
3 of 5 checks passed
@Tuntii Tuntii deleted the 0.0.3-Performance branch January 14, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants