Skip to content
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

fix: force YAML loading to confirm to JSON-compatible types #247

Merged
merged 2 commits into from
May 11, 2022

Conversation

erunion
Copy link
Contributor

@erunion erunion commented Oct 11, 2021

While investigating some @apidevtools/swagger-parser quirks I discovered that loading a YAML file that contains a date-like string causes that date to be converted into a Date object, causing the API definition to fail validation.

This updates the usage of js-yaml to ensure that all YAML content conforms to JSON-compatible types by way of its schema option (docs here).

@philsturgeon philsturgeon enabled auto-merge March 9, 2022 17:17
@philsturgeon philsturgeon disabled auto-merge May 11, 2022 21:30
@philsturgeon philsturgeon merged commit cd9bd91 into APIDevTools:main May 11, 2022
@erunion erunion deleted the fix/dates-as-strings branch November 26, 2022 16:53
@github-actions
Copy link

🎉 This PR is included in version 9.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants