server-decorator-openapi 2.0.25
“OpenAPI 3.1 document generator for server-decorator EntitySpec IR”
Basename is uppercase README.mdNear-zero recent downloads for registry package
SHA-256285a29a7eba8c3296e37cbd0d96a07d98d590f179d09dfde7ad155a7d15894d7
MaleculeH(Db)Md
Evidence
1use crate::patterns::{EMAIL_PATTERN, URI_PATTERN, UUID_PATTERN};
2use serde_json::{json, Map, Value};
3use server_decorator_entity::canonical::canonicalize_value;
4use server_decorator_entity::spec::{EntitySpec, FieldSpec, SchemeSpec};
5use std::collections::BTreeSet;
6use thiserror::Error;
7
8#[derive(Debug, Error)]
9pub enum OpenApiError {
10 #[error("{entity}: no field with role \"id\"")]
11 MissingIdField { entity: String },
12 #[error("serialization error: {0}")]
114:10… f let Some(ref fields) = f.fields {
115 for sub in fields {
116 if keep(sub) {
117 let sub_s = json_schema_for_ …
278:6…
279}
280
281fn json_body(ref_name: &str) -> Value {
282 json!({
283 "content": {
284 "application/json": {
285 "schema": {
286 "$ref": format!("#/components/schemas/{ref_ …
5:96… oblem Details · Axum integration · Tokio async runtime.
6
7---
8
9## Crate Overview
10
11| Crate | Path | Capabilities |
12| :--- | :--- | :--- |
13| **`server-decorator-entity`** | `rust/crates/server-decorator-entity` …
17:110… automatic DTO validation, and RFC 9457 Problem Details |
18
19---
20
21## 1. Declaring Entities (`server-decorator-entity`)
22
23### Fluent Builder API
24
25```rust
⋯5 lines
No evidence locations were recorded for this file. Raw result