Closed Prn-Ice closed 3 years ago
@Prn-Ice Hi :wave:
Thank you for your suggestion. The generator has a secret key when you run models from the models.jsonc
. By adding key __path you can override the default path and navigate your models where you want and how your want, it is up to your risk because it is not documented yet and is in the beta state. Would be nice if you can test it and report issues. For example, in your case to navigate your coin_metadata
models to home directory. It should look like this :point_down:
[
{
// The sorting is important first class then path.
"__className": "coin_metadata",
"__path": "/lib/app/modules/home/data" // <- override default path with a new one by adding '__path' key.
// the rest json data...
},
{
"__className": "coin_metadata_client",
"__path": "/lib/app/modules/home/repository"
// the rest json data...
},
{
"__className": "coin_metadata_repository",
"__path": "/lib/app/modules/home/repository"
// the rest json data...
},
{
"__className": "coin_metadata_service",
"__path": "/lib/app/modules/home/services"
// the rest json data...
}
]
OBS! and you need to update to the 3.3.6 version. I have corrected some bugs.
Hope you will like this :smiley:
Thanks a lot, I'll check it out.
Wow, it woorks thank you.
@Prn-Ice Hi. I need to test one more secret feature.
}
"trailers": [
{
"key": "Trailer",
"dimension": null,
// Be adding ".trailer_type" you can force generator to generate new type.
// Result : `TrailerType type;` instead `Type type;`
// It works only with not primitive types.
"type.trailer_type": {
//...
}
}
],
},
Report any issues. Have a fun coding 😉
Is there an existing issue for this?
Current Behavior
Currently I can create a general
models.jsonc
in the root of my project that generates all my models in one folder.Expected Behavior
I use something similar to reso coders clean architecture and all my models are not to be stored in one folder but within the feature for which they were created like this:
Would be nice if I could have a model.jsonc file for each data folder that I update as the API responses change.
Steps To Reproduce
No response
Version
Relevant JSON syntax
No response
Anything else?
No response