Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Produce better warnings when using configuration options that have been removed#90

Merged
liamnichols merged 1 commit intomainCreateAPI/CreateAPI:mainfrom
ln/unsupported-optionsCreateAPI/CreateAPI:ln/unsupported-optionsCopy head branch name to clipboard
Aug 4, 2022
Merged

Produce better warnings when using configuration options that have been removed#90
liamnichols merged 1 commit intomainCreateAPI/CreateAPI:mainfrom
ln/unsupported-optionsCreateAPI/CreateAPI:ln/unsupported-optionsCopy head branch name to clipboard

Conversation

@liamnichols
Copy link
Member

In #77 we started emitting warnings for unknown properties that were found in the config options as well as deprecations:

WARNING: The property 'overridenResponses' (in 'paths') has been deprecated. Renamed to 'overriddenResponses'.
WARNING: Found an unexpected property 'unknownProperty'.

While the deprecations are useful, to begin with we are going to be a bit more aggressive and skip deprecating types meaning that when upgrading from 0.0.5 to 0.1.0, you'll end up seeing warnings like "Found an unexpected property 'overridenResponses' (in 'paths')."

This might initially be confusing to the user since it use to work. The aim of this change is to tweak the messaging to better support direct replacements without deprecation.

With this change, a user defining overridenResponses in the config will now see the following:

The property 'overridenResponses' (in 'paths') is no longer supported. Use 'overriddenResponses' instead.

Its mostly similar to the deprecation besides one thing: it doesn't assume the property was only renamed (i.e the behaviour could change). Its just a small helper to improve the developer experience.

@liamnichols liamnichols self-assigned this Aug 4, 2022
@liamnichols liamnichols merged commit e105e8d into main Aug 4, 2022
@liamnichols liamnichols deleted the ln/unsupported-options branch August 4, 2022 16:15
@liamnichols liamnichols mentioned this pull request Aug 4, 2022
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.