-
Notifications
You must be signed in to change notification settings - Fork 98
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
Don't remove extraneous configurations, only warn about their presence #218
Conversation
bravado_core/spec.py
Outdated
@@ -244,17 +243,15 @@ def _internal_spec_dict(self): | |||
else: | |||
return self.spec_dict | |||
|
|||
def deref(self, ref_dict): | |||
def _deref(self, ref_dict): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, should we call this differently? E.g. _force_deref
?
tests/spec/validate_config_test.py
Outdated
): | ||
spec = Spec.from_dict(minimal_swagger_dict, origin_url=get_url(minimal_swagger_abspath), config=config) | ||
assert spec.config != dict(CONFIG_DEFAULTS, **config) | ||
assert bool(spec.config != dict(CONFIG_DEFAULTS, **config)) is expected_different_config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs the brackets, but not the bool cast (the brackets are needed due to Python's comparison operator chaining).
3e7b348
to
93c2a7a
Compare
Fixes #217 .
The goal of this PR is to fix the current
Yelp/bravado
build failure.bravado
is failing because it used to injectalso_return_response
configuration intobravado-core
configs, which is not using that config.Since
bravado-core
is not using this config, I'm not adding it intoCONFIG_DEFAULTS
, but removing the logic that strips out extraneous configurations.This PR exposes also
_deref
method in order to force dereferencing of objects even ifinternaly_dereference_ref
in order to reducetest_deref_flattened_spec_not_recursive_specs
flakyness.