Closed tylerbhadra closed 3 months ago
Extended OAS adapter to handle parsing of static and aliased path segments as well as response_header_name and response_param_name resources from response bodies in OpenAPI description files + fixed bug in __dereference()
function related to incomplete param extraction from nested references in array type schema objects. Additionally, added new resource classes for component names (header_names, body_param_names, query_param_names, response_param_names, response_header_names), a new endpoint importer service (endpoints_import_service.py
), and the endpoint import
cli command in endpoint_cli.py
.
Allows users to more easily create and maintain mocks by importing OAS directly into Stoobly using the endpoint import
cli command [#212]
Modified the openapi_endpoint_adapter_additional_props_test.py
, openapi_endpoint_adapter_missing_info_test.py
, openapi_endpoint_adapter_missing_oauth2_scopes_test.py
, openapi_endpoint_adapter_missing_servers_test.py
, and openapi_endpoint_adapter_test.py
to expect updated output that reflects the changes made to the default port
and host
values when there is a missing servers list, as well as the newly added response_header_names
and response_param_names
values.
The endpoint import
command currently does not work with OpenAPI files that include HEAD, PATCH and TRACE operations since those do not seem to be supported/allowed values for the method
parameter in the request body for the POST /endpoints
api route. Also, the OAS adapter does not currently support OpenAPI v2.0 which means endpoint import
only works with versions 3.0 and 3.1 of OpenAPI.
So far looks great!
Made suggested changes
Made suggested changes/fixes in OAS adapter and endpoints_import_service
Changes Made:
Extended OAS adapter to handle parsing of static and aliased path segments + response bodies in OpenAPI description files and generation of response_header_name and response_param_name resources. Additionally, added new resource classes for component names (header_names, body_param_names, query_param_names, response_param_names, response_header_names), a new endpoint importer service (
endpoints_import_service.py
), and theendpoint import
cli command inendpoint_cli.py
.Expected Benefits:
Allows users to more easily create and maintain mocks by importing OAS directly into Stoobly using the
endpoint import
cli command #212Additional Notes:
The
endpoint import
command currently does not work with OpenAPI files that include HEAD, PATCH and TRACE operations since those do not seem to be supported/allowed values for themethod
parameter in the request body for thePOST /endpoints
api route.