Rust

reference

Module

Following $ref references inside one document.

Only object references (parameters, responses, examples, security schemes, path items) are followed while reading; schema references stay SchemaKind::Reference, because recursive schema graphs are legal.

Contents

use utopia_openapi::LocalResolver;
Rust
pub struct LocalResolver<'a>

Resolves local references (#/... JSON Pointers) against one document; any other reference is Error::ReferenceNotFound.

use utopia_openapi::Reference;
Rust
pub struct Reference

A $ref value.

use utopia_openapi::ResolutionContext;
Rust
pub struct ResolutionContext

What a resolution already went through: the references followed so far (to detect cycles) and the base URI of the document, for resolvers that fetch other documents.

use utopia_openapi::Resolver;
Rust
pub trait Resolver

Resolves a reference to the value it points to.

Implement it to resolve references LocalResolver refuses (other documents, URLs).

Implemented byLocalResolver