Release 0.3.0
Initial release. Rust port of apcore-toolkit-python v0.3.0.
Added
ScannedModulestruct — canonical representation of a scanned endpoint,
with all 12 fields matching the Python dataclass (serdeSerialize/Deserialize)Scannerasync trait — generic overApptype parameter for framework-specific
scanning (e.g.,Scanner<axum::Router>,Scanner<actix_web::App>).
Uses#[async_trait]for asyncscan()methodfilter_modules()— regex-based include/exclude filtering withResulterror
handling for invalid patternsdeduplicate_ids()— resolves duplicate module IDs by appending_2,_3, etc.infer_annotations_from_method()— HTTP method toModuleAnnotationsmapping
(GET → readonly+cacheable, DELETE → destructive, PUT → idempotent)YAMLWriter— generates.binding.yamlfiles forapcore::BindingLoaderwith
filename sanitization, path traversal protection, and optional verificationRegistryWriter— registers modules directly intoapcore::Registrywith
pluggableHandlerFactoryfor target resolution. Falls back to passthrough
handler for schema-only registrationHTTPProxyRegistryWriter— registers scanned modules as HTTP proxy modules
that forward requests to a running web API. Supports path parameter substitution,
pluggable auth headers viaArc, and JSON error extraction.
Feature-gated behindhttp-proxy(reqwestdependency)OutputFormatenum +get_writer()factory — maps format strings to writer
variants ("yaml","registry","http-proxy")- Output verification system:
Verifiertrait — pluggable verification protocolYAMLVerifier— validates YAML syntax and required binding fieldsJSONVerifier— validates JSON syntaxMagicBytesVerifier— validates file header magic bytesRegistryVerifier— validates module is retrievable from registryrun_verifier_chain()— sequential verifier execution withcatch_unwind
panic safety (matches Python'stry/exceptbehavior)
WriteResult/VerifyResult— structured result types for all writer and
verifier operations (serdeSerialize/Deserialize)WriteError— typed error viathiserrorfor file I/O failures- OpenAPI utilities:
resolve_ref()— JSON$refpointer resolutionresolve_schema()— conditional$refresolutionextract_input_schema()— merges query/path parameters and request bodyextract_output_schema()— extracts 200/201 response schemadeep_resolve_refs()(internal) — recursive$refresolution for nested
schemas (allOf/anyOf/oneOf,items,properties), depth-limited to 16
enrich_schema_descriptions()— merges parameter descriptions into JSON Schema
properties with optional overwrite modeannotations_to_value()/module_to_value()/modules_to_values()—
serialization utilities withtracing::warn!on serialization failuresto_markdown()— generic JSON-to-Markdown conversion with depth control,
table heuristics, field/exclude filtering, and UTF-8 safe truncationAIEnhancer— SLM-based metadata enhancement using local OpenAI-compatible
APIs (Ollama, vLLM, LM Studio) viaureq. Fills missing descriptions,
documentation, behavioral annotations (all 11 fields), and input schemas.
All AI-generated fields tagged withx-generated-by: slmfor auditability.
Configuration via environment variables (APCORE_AI_*) or constructor paramsEnhancertrait — pluggable interface for metadata enhancementAIEnhancerError— typed error enum viathiserrorwithConfig,Connection,
ResponsevariantsHandlerFactory/HandlerFntype aliases — enable framework adapters to
provide real async handlers for registered modules
Intentionally Omitted (Python-specific)
PythonWriter— generates Python source code; not applicable to Rust consumersSyntaxVerifier— validates Python AST syntax; not applicableflatten_pydantic_params()— Pydantic-specific; Rust has no equivalentresolve_target()— Pythonimportlibdynamic import; Rust usesHandlerFactory
Dependencies
- apcore (path dep to
../apcore-rust) >= 0.13.0 - serde + serde_json + serde_yaml — serialization
- regex — pattern matching
- chrono — timestamps
- tracing — structured logging
- thiserror — domain error types
- async-trait — async trait support
- tokio — required transitively by apcore
- ureq — synchronous HTTP for AI enhancer
- reqwest (optional,
http-proxyfeature) — async HTTP for proxy writer
Tests
- 176 unit tests + 1 doc-test, all passing
- clippy clean (0 warnings with
-D warnings) - All quality gates:
cargo fmt,cargo clippy,cargo build,cargo test