Replies: 1 comment 4 replies
-
Implementation of Version 1 found at #1094 |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem Statement
Currently, Microcks does not support mocking of non-UTF8 encoded data, such as binary files, PDFs, images, etc. This limitation restricts the ability to fully test APIs that are expected to handle various file types in real-world scenarios.
Proposed Feature
The proposed enhancement aims to extend Microcks' functionality to include support for non-UTF8 encoded data by utilizing the "externalValue" property defined in the OpenAPI specification (https://swagger.io/specification/#example-object). This feature would enable Microcks to reference and serve external files, such as binary files, PDFs, images, and more, as part of API mocking responses.
Use Cases
Benefits
Implementation
1. Relative "External Value" Support
The first step in implementing this feature is to enable support for relative file references using the "externalValue" property. This would allow users to specify file paths relative to the location of the API specification. Microcks will:
2. URL "External Value" Support
Building upon the initial support for relative file references, the next phase involves enabling Microcks to handle "externalValue" properties with full URLs. This capability will allow Microcks to fetch and serve files from remote locations. For secure access to these resources, Microcks will utilize its existing credential handling mechanism. Users will simply need to reference the appropriate credential object within their API specification using extensions ("x-microcks-example")
Beta Was this translation helpful? Give feedback.
All reactions