This repository has been archived by the owner on Oct 1, 2018. It is now read-only.
ServiceGen parameters as JSON with ModelRoot, FetchPath and SplitIntoApps. #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Parameters are now in a JSON file similar to the model generator.
Some changes:
OutputDirectory
should now refer to "app" folder in the SPA ("services" will be appended as necessary)FetchPath
can be used to override the path to the "fetch" import (defaults to"services/server"
, to keep the existing behaviour as default)ModelRoot
can be used to override the path to the model folder (defaults to"model"
, for the same reason). Note: both paths are relative toOutputDirectory
.SplitIntoApps
is a new toggle to generate the services from different frontends into different top folders, which then contains their "services" folder. If off (the default), it will generate controllers inservices/{frontEnd}/{folders}
, if on it will be{frontEnd}/services/{folders}
.This works for me as is, but I think you'd at least want an option to add your frontend numbering. Do you see anything else missing?
My JSON config file, for reference: