Yelp / bravado-core

Other
109 stars 98 forks source link

Use http_client from the internal spec in the `_SpecFlattener.model_discovery`. #386

Closed kwist-sgr closed 2 years ago

kwist-sgr commented 2 years ago

This will allow you to use bravado-core with the jsonschema > 4.0.

E.g. in the following case:

from bravado_core.spec import Spec
from bravado.requests_client import RequestsClient

http_client = RequestsClient()
spec = Spec.from_dict(spec_dict, origin_url=origin_url, config=config, http_client=http_client)

# This call can throw an error without the fix
flattened_spec = spec.deref_flattened_spec
kwist-sgr commented 2 years ago

bravado-core doesn't currently support jsonschema>4 - many tests fail. I guess the reason is that the last release of bravado-core was before jsonschema v4 was released.

See also #385.