struct Analyzer::Specification::SpecDoc(T)

Overview

A parsed specification document together with the path it was read from.

A $ref is relative to the file that writes it, not to the document the scan started from: once an operation has been pulled in from paths/activity/activities.yaml, its ../../openapi.yaml#/components/parameters/Fields has to resolve from that file's directory. A node carried across a file boundary therefore has to carry its origin with it, which is precisely what passing the entry root alone — all the analyzers needed while every ref was same-document — cannot express.

Defined in:

analyzer/engines/specification_engine.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(root : T, path : String) #

[View source]

Instance Method Detail

def path : String #

[View source]
def root : T #

[View source]