Skip to content
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

Use external value to serve non-utf8 encodable data #1042

Open
3 tasks
Apoorva64 opened this issue Jan 15, 2024 · 5 comments
Open
3 tasks

Use external value to serve non-utf8 encodable data #1042

Apoorva64 opened this issue Jan 15, 2024 · 5 comments
Labels
keep-open Explicitily keep open kind/feature

Comments

@Apoorva64
Copy link
Contributor

Apoorva64 commented Jan 15, 2024

Reason/Context

Why we need this improvement?
To be able to serve PDF, Images, ByteStreams in Microcks
How will this change help?
This will greatly open what microcks can do in terms of REST API Mocking
What is the motivation?
I have an API that returns PDFs but the exemples cannot be encoded in an OpenApi file.

Description

Upon receving a request.
Microcks gets the value of the "externalValue" field in an OpenApi specification
Does the request to the url of the external value
Override headers of the response and return it.

see https://swagger.io/docs/specification/adding-examples/#external

Implementation ideas

  • On Import parse the "externalValue" field in the "Exemple". And microcks anaotations to define secret to use
  • Store the url and configuration in the Response Object
  • On mock request do the request to the 'url', return the same content but modify the headers
@lbroudoux
Copy link
Member

This is being discussed here in this thread: #1093

Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale State due to inactivity label Mar 23, 2024
@lbroudoux lbroudoux removed the stale State due to inactivity label Apr 5, 2024
@lbroudoux
Copy link
Member

I think that task number 3 of the list above can benefit from the proxy component being proposed in the context of #1100 ...

Copy link

github-actions bot commented May 6, 2024

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale State due to inactivity label May 6, 2024
@lbroudoux lbroudoux added keep-open Explicitily keep open and removed stale State due to inactivity labels May 21, 2024
@lbroudoux
Copy link
Member

Keeping this issue open as we'd like to tackle this in future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-open Explicitily keep open kind/feature
Projects
None yet
Development

No branches or pull requests

2 participants