feat: allow configuring config path#88
Conversation
Currently this action assumes that the Redocly configuration lives in the root of wherever it is being run. That might not always be the case, thus I'm adding this option to be able to set where the config lives.
|
Hi @rubda! Thank you for your contribution. Currently |
|
Hi @SmoliyY! Thanks for having a look, regarding the below. How is this action supposed to work if the
|
What/Why/How?
What: Added optional
configPathinput parameter to allow specifying custom path to Redocly configuration file.Why: Currently this action assumes that the Redocly configuration lives in the root of wherever it is being run. That might not always be the case, thus I'm adding this option to be able to set where the config lives.
How: Extended the action inputs, updated parsing logic to handle the new parameter, and modified
getRedoclyConfig()to pass the custom path toloadConfig()from@redocly/openapi-core.Reference
loadConfig({ configPath })API from@redocly/openapi-coreconfigparameter is provided, uses default discovery behaviorTesting
parseInputData()with and without custom config parametergetRedoclyConfig()with default and custom config pathsloadConfigto avoid file system dependencies in testsScreenshots / Video (optional)
N/A
Additional context
Usage example: