mockserver icon indicating copy to clipboard operation
mockserver copied to clipboard

Consider introducing MOCKSERVER_INITIALIZATION_JSON_PATH's analogue for OpenAPI YAML file

Open cyber-barrista opened this issue 3 years ago • 2 comments

Describe the feature request When it comes to the docker instance of a mockserver there're handy ENVs that enable a user to point out to mapped under the container config files (properties and expectation initialiser JSON). Would be so convenient to have the same type of ENV for OpenAPI YAML files.

What you are trying to do Trying to initialise a docker instance of mockserver with an OpenAPI YAML file.

The solution you'd like Introducing something like MOCKSERVER_INITIALIZATION_OPENAPI_YAML_PATH which points to a file which is to be parsed and used by the server at its startup.

Describe alternatives you've considered Current workaround is

  • Spin off not initialised mockserver docker container with the OpenAPI YAML file mapped under
  • Feed the YAML to the mockserver invoking mockserver/openapi from the outside later on

PS. If such functionality already exists but undocumented of if there're other elegant solutions I didn't think of would be glad to hear of them. Thank you!

cyber-barrista avatar May 03 '22 22:05 cyber-barrista

i think this will be useful also. I was looking this feature in the documentation.

daniram94 avatar May 06 '22 10:05 daniram94

I agree this makes sense I'll look to add this in the next few weeks or so for the next release

jamesdbloom avatar May 06 '22 15:05 jamesdbloom

Is there any news on this suggestion ? It is surprising for this software not to include this feature.

camilok14 avatar Nov 15 '22 14:11 camilok14