By Default the collection is RESTLER_PATH environment value. That we create by using export RESTLER_PATH=collection-dir-name or RESTLER_PATH defined in the .env file in the root folder (yet to implement).
This structure will be sufficient in most of the cases. You can always modify the RESTLER_PATH for inner module to use as the collection. Thats should not be issue, but sometimes changing the RESTLER_PATH will be irritating as you might need to jump in to different request frequently if you hav large codebase and multiple layers of microservices.
Expected Behavior
Collections is the folder of rester file structure i.e env, config, requests.
One collection can be another collection nested with it.
How can we define which collection to use?
With --collection or c flag with restler i.e restler c nested-collection/nested-collection-2 p articles. This command should set the collection name as nested-collection/nested-collection-2 and run post commands for articles requests.
With set command.
Set command
Set command should write RESTLER_COLLECTION=nested-collection/nested-collection-2 in the .restler folder inside config.yaml file. This file will be always loaded for temporary configuration.
command will look like restler set collection nested-collection1/nested-collection2
or
restler s c nested-collection1/nested-collection2
User should be able to remove the RESTLER_COLLECTION from .restler/config.yaml with unset command.
for eg.
restler unset collection # or restler unset c
for modify, you can use the same set command again.
Current Behavior
By Default the collection is RESTLER_PATH environment value. That we create by using export RESTLER_PATH=collection-dir-name or RESTLER_PATH defined in the .env file in the root folder (yet to implement).
By design, we will have
This structure will be sufficient in most of the cases. You can always modify the RESTLER_PATH for inner module to use as the collection. Thats should not be issue, but sometimes changing the RESTLER_PATH will be irritating as you might need to jump in to different request frequently if you hav large codebase and multiple layers of microservices.
Expected Behavior
How can we define which collection to use?
restler c nested-collection/nested-collection-2 p articles
. This command should set the collection name as nested-collection/nested-collection-2 and run post commands for articles requests.Set command
Set command should write
RESTLER_COLLECTION=nested-collection/nested-collection-2
in the.restler
folder insideconfig.yaml
file. This file will be always loaded for temporary configuration.command will look like
restler set collection nested-collection1/nested-collection2
orUser should be able to remove the RESTLER_COLLECTION from
.restler/config.yaml
withunset
command.for eg.
for modify, you can use the same set command again.