You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
I would appreciate if you provide a way to give custom names to the generated resource interfaces.
The problem is, that the current generator seems to take the name for the "root" resource (i.e. the top one) to give a name to the resource interface.
In my case the resources, described in the RAML file, have the following path:
/{tenantId}/{userId}/images/...
So semantically speaking, "Images" would be the right name, whereas in reality I get "TenantId". Not really a big deal, but looks a bit weird.
Neither in the Configuration class nor in the AbstractGenerator/Generator I found a way to overrule that. Did I miss anything? If not, would it be possible to add such a feature?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
and here you may learn how to use extensions: #105
Note that inside any extension you have access to the whole RAML model. Thus, you may use information about the whole set of resources when composing name for each of them.
My exmaple in #105 contained one error: returning false in the AddParameterFilter method prevents all RAML parameters from apperaing as arguments of JAX RS method. So, the method must return true.
Please, keep it in mind.
I've edited the comment in order to make it a correct example.
Regards,
Konstantin
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I would appreciate if you provide a way to give custom names to the generated resource interfaces.
The problem is, that the current generator seems to take the name for the "root" resource (i.e. the top one) to give a name to the resource interface.
In my case the resources, described in the RAML file, have the following path:
/{tenantId}/{userId}/images/...
So semantically speaking, "Images" would be the right name, whereas in reality I get "TenantId". Not really a big deal, but looks a bit weird.
Neither in the Configuration class nor in the AbstractGenerator/Generator I found a way to overrule that. Did I miss anything? If not, would it be possible to add such a feature?
Thanks in advance.
The text was updated successfully, but these errors were encountered: