-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apidom-reference: parser plugins are inflexible when it comes to file extensions #4298
Labels
Comments
char0n
added a commit
that referenced
this issue
Aug 8, 2024
char0n
added a commit
that referenced
this issue
Aug 8, 2024
Addressed in #4299 |
char0n
added a commit
to swagger-api/swagger-js
that referenced
this issue
Aug 9, 2024
char0n
added a commit
to swagger-api/swagger-js
that referenced
this issue
Aug 9, 2024
github-merge-queue bot
pushed a commit
to infonl/dimpact-zaakafhandelcomponent
that referenced
this issue
Mar 7, 2025
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.webjars:swagger-ui](https://www.webjars.org) ([source](https://github.com/swagger-api/swagger-ui)) | `5.18.3` -> `5.20.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>swagger-api/swagger-ui (org.webjars:swagger-ui)</summary> ### [`v5.20.0`](https://github.com/swagger-api/swagger-ui/releases/tag/v5.20.0): Swagger UI v5.20.0 Released! ##### Bug Fixes - **docker:** add OpenContainer labels - **json-schema-5**: fix JumpToPath feature for schemas, closes [swagger-api/swagger-editor#4035](https://github.com/swagger-api/swagger-editor/issues/4035) - fix JumpToPath feature for auth methods - display the correct name of security methods - fix console errors appearing when security scheme is not defined - **components**: render examples only when their shape is correct - **swagger-client**: allow resolving URLs without extensions, closes [swagger-api/apidom#4298](https://github.com/swagger-api/apidom/issues/4298) - **css**: fix css sourcemaps - **security**: update axios to address CVE-2024-39338 - **swagger-client**: do not encode server variables, closes [swagger-api/swagger-js#3656](https://github.com/swagger-api/swagger-js/issues/3656) - **security**: fix unsafe cookie serialization, addresses CVE-2024-47764, GHSA-pxg6-pf52-xh8x - **spec**: compensate if OpenAPI.paths field is defined as unexpected structure - **json-schema-2020-12**: check for schema type before extracting extension keywords, closes [swagger-ui/issues#9376](https://github.com/swagger-api/swagger-ui/issues/9376) - **json-schema-2020-12**: fix rendering of uniqueItems keyword - **json-schema-2020-12**: fix overrides of JSON Schema extension keywords - **spec**: clear JSON state when loading a new definition - **oas31**: fix caching of JSON Schema 2020-12 context - **json-schema-2020-12**: fix default expansion being applied to components after initial render - **json-schema-2020-12**: fix complex schemas expanding beyond the default expansion depth - **json-schema-2020-12**: fix deep expansion not expanding some of the keywords - **oas31**: fix expansion of Schema Object fixed fields ##### Features - **swagger-ui-react**: add support for initialState prop - add horizontal scrollbar for schemas, refs [swagger-api/swagger-ui#8940](https://github.com/swagger-api/swagger-ui/issues/8940) - display schema of complex parameters - display schema of complex request body properties - **json-schema-2020-12**: allow to use fn outside of React context - **oas31**: display schema of complex parameters with union type - **oas31**: display schema of complex request body properties with union type - **oas31**: display textarea for parameters with complex union type - **json-schema-2020-12**: allow to use getTitle outside of JSON Schema 2020-12 context - **json-schema-2020-12**: introduce system bound HOC - **json-schema-2020-12**: add support for rendering extension keywords, closes [swagger-ui/issues#9376](https://github.com/swagger-api/swagger-ui/issues/9376) - **json-schema-2020-12**: add support for rendering examples keyword - **json-schema-2020-12**: use JSON Viewer to display keywords with complex values - **json-schema-2020-12**: handle empty objects and arrays in JSONViewer - **oas3**: more support for OpenAPI 3.0.4 - introduce custom URL sanitization mechanism - apply additional fixes for custom URL sanitization mechanism - **oas31**: add support for OpenAPI extensions - **json-schema-2020-12**: respect showExtensions config option *** #### Attributions (alphabetical order) [@​char0n](https://github.com/char0n) [@​glowcloud](https://github.com/glowcloud) [@​robert-hebel-sb](https://github.com/robert-hebel-sb) ### [`v5.19.0`](https://github.com/swagger-api/swagger-ui/releases/tag/v5.19.0): Swagger UI v5.19.0 Released! ##### Features - add support for OpenAPI 3.0.4 ([#​10247](https://github.com/swagger-api/swagger-ui/issues/10247)) ([d437474](https://github.com/swagger-api/swagger-ui/commit/d437474b0c8aef286522d19bc7d02e35230d9a7d)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/infonl/dimpact-zaakafhandelcomponent). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuNCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behavior
Parser plugins support
fileExtensions
.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]
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.
The text was updated successfully, but these errors were encountered: