feature request: Hide AJVs "unknown format" complaints
See original GitHub issueDescribe the bug
According to the spec, format
is is an open string-valued property, and can have any value.
Spectral generates (pollutes?) stdout with warnings about "unknown format"s.
To Reproduce
repro/output.openapi.yaml
openapi: 3.0.0
servers:
- url: "https://ex-ample.com"
x-format-version: "1.0"
info:
title: Four
description: Issue repro 4
contact:
email: e@e.com
version: 0.0.0
paths: {}
components:
schemas:
AModel:
description: Yet another self descriptive explanation
type: object
properties:
a_country:
description: Guess what? A country.
type: string
format: "ISO-3166-1 alpha-2"
example: de
Run
$ yarn spectral lint repro/output.openapi.yaml -o repro/log.txt -q
yarn run v1.15.2
$ C:\REDACTED\node_modules\.bin\spectral lint repro/output2.openapi.yaml -o repro/log.txt -q
unknown format "ISO-3166-1 alpha-2" ignored in schema at path "#"
unknown format "ISO-3166-1 alpha-2" ignored in schema at path "#"
Done in 1.52s.
repro/log.txt
(empty)
Expected behavior Nothing in stderr/stdout
Environment (remove any that are not applicable):
- Library version: 4.0.1
- OS: Windows 7
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Feature Request: Automatic Unrequiring Hidden Fields - Jotform
Hello SunbridgeInstitute,. Can you please let me know which hidden question of your form is still required even if the field itself. Please...
Read more >Untitled
Nbr 2014, Huw davies bbc, Thl w8s camera review, 30k op squad builder fifa 15, ... Samri saudi, Make search form access 2010,...
Read more >Expression of Antimicrobial Peptide Genes in the Canine ...
Several studies have demonstrated its properties, including antimicrobial features. As a result of the restricted availability of human ...
Read more >Transcriptomics and Metabolomics Changes Triggered by ...
Inflorescence removal increases the yield and quality of P. notoginseng, but the underlying molecular mechanisms are unknown.
Read more >Copyright © 2019 The American Society of Human Genetics ...
recessive mutations, but the contribution of dominant de novo mutations (DNMs) to this trait is unknown. Here, we performed genetic studies ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey there, this related to https://github.com/epoberezkin/ajv/issues/466 in which the author of AJV makes it very clear that people should be aware of unknown formats.
I would like to try and hide these specific messages because you are correct, the OAS spec does say you can use whatever you want.
Sounds good. Had a quick look and surfacing it at the spectral messages level will require some more work.