You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When this option is set to empty list, it means fileExtensions are not required and if provided, it's not checked what the extensions are.
When fileExtensions as set to e.g. [.yaml, .yml], is means that these are the allowed and one of those value is required. If extension is omitted the parser rejects to parse.
This feels inflexible and by default doesn't support SwaggerHUB Domains.
Proposed behavior
By default, fileExtensions should be empty list. Which means that the parser plugin will always run it's detection mechanism to determine the format and specification within the file object. No file or URL will be rejected just because it doesn't have a proper file extension.
Anybody that is looking for a strict behavior of requiring file extensions, it will still be possible to configure it, by just setting e.g. [.yaml, .yml] as fileExtensions.
Warning
an additional effect of not handling file extensions by default, is that a lot of files will now fall under YAML parser, which considers a lot string a valid YAML.
Current behavior
Parser plugins support
fileExtensions.When this option is set to empty list, it means
fileExtensionsare not required and if provided, it's not checked what the extensions are.When
fileExtensionsas set to e.g.[.yaml, .yml], is means that these are the allowed and one of those value is required. If extension is omitted the parser rejects to parse.This feels inflexible and by default doesn't support SwaggerHUB Domains.
Proposed behavior
By default,
fileExtensionsshould be empty list. Which means that the parser plugin will always run it's detection mechanism to determine the format and specification within the file object. No file or URL will be rejected just because it doesn't have a proper file extension.Anybody that is looking for a strict behavior of requiring file extensions, it will still be possible to configure it, by just setting e.g.
[.yaml, .yml]asfileExtensions.Warning
an additional effect of not handling file extensions by default, is that a lot of files will now fall under YAML parser, which considers a lot string a valid YAML.