How Csvlint::Validator handles different sources
mainThe Csvlint::Validator adapts its validation strategy based on the type of source provided:
- URL (String): Uses
Typhoeusto perform an HTTP request. It validates metadata from response headers (likecontent-typeandlinkheaders) and processes the body in chunks. It supports following redirects. - File: Parses the file extension to determine type and uses the file path to locate potential metadata/schemas.
- IO / StringIO: Processes the content as a stream using
each_line.
If a URL is provided, the validator also looks for a schema via the link header (e.g., rel="describedby") or by checking the /.well-known/csvm path on the host.