-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or request
Description
As in file inferring when neither file or data attributes are present, it would be nice to have the endpoint path as folder prefix when a file is given, so it wouldn't allow the data folder to be unorganized.
Example:
{
path: '/menu/categories',
methods: [
{
type: 'get',
overrides: [
{
name: 'Default',
},
{
name: 'Duplicated',
file: 'duplicated.json',
// would infer the file 'data/menu/categories/duplicated.json', or maybe 'data/menu/categories-duplicated.json'
},
],
},
{
type: 'post',
file: 'created.json',
// would infer the file 'data/menu/categories/created.json', or maybe 'data/menu/categories-created.json'
},
],
},
Another interesting addition would to have the HTTP method in the inferred file, e.g.:
{
path: '/menu/categories',
methods: [
{
type: 'post',
// would infer the file 'data/menu/categories/post.json'
},
],
},
To accomplish it, we could just join the inferred path with the given file attribute, it would easy IMHO :)
rhberro
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request