openapi-core
openapi-core copied to clipboard
Openapi-core is a Python library that adds client-side and server-side support for the OpenAPI v3.0 and OpenAPI v3.1 specification.
Hi, I was planning on using the (Django REST Framework) Response validation in some unit tests. These unit tests are performing different actions on the REST API and validate the...
--click-- for chunk of code illustrating the issue. ```python import json import openapi_core as openapi from openapi_core.testing import MockRequest spec_dict = { "openapi": "3.0.0", "info": { "version": "0.0.1", "title": "bug",...
It would be useful if this project included [type hints](https://docs.python.org/3/library/typing.html) or published [type stubs](https://github.com/python/typeshed), especially because the code works with inherently schematic data.
I have the following issue. [drf-spectacular](https://github.com/tfranzel/drf-spectacular) generates the following spec for enums (for example, for a building_type field which can be either "house" or "apartment" or null): ``` WhateverObject: type:...
I have a schema with a reference graph that looks like `openapi.yaml` -> `sub/paths.yaml` -> `schemas.yaml`. The middle schema is in a subdirectory and the first and last schemas are...
I have an OpenAPI Schema that I'm generating from a Django (a python web framework) using a library called [drf-spectacular](https://github.com/tfranzel/drf-spectacular). Fields that contain a URL are generated as a "type:...
Currently one gets: ``` ../../../../.local/share/virtualenvs/woocart-api-zie1bQwL/lib/python3.6/site-packages/openapi_core/validation/response/validators.py:37: in validate data, data_errors = self._get_data(response, operation_response) ../../../../.local/share/virtualenvs/woocart-api-zie1bQwL/lib/python3.6/site-packages/openapi_core/validation/response/validators.py:53: in _get_data media_type = operation_response[response.mimetype] ../../../../.local/share/virtualenvs/woocart-api-zie1bQwL/lib/python3.6/site-packages/openapi_core/schema/responses/models.py:21: in __getitem__ return self.content[mimetype] ../../../../.local/share/virtualenvs/woocart-api-zie1bQwL/lib/python3.6/site-packages/openapi_core/schema/content/models.py:18: in __getitem__ if fnmatch.fnmatch(mimetype, key): ../../../../.local/share/virtualenvs/woocart-api-zie1bQwL/lib/python3.6/fnmatch.py:34:...
Since `operationId` is a unique property. If there is a way to fetch schema details with a `operationId` will be very useful, rather than using path-pattern.
1. Why `validate_body() is deprecated ? 2. Is there any alternative to validate request-body alone?