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
Issue
After updating the namespace key in the .graphiticfg.yml file and generating a resource, the old API namespacing is still applied to the generated files.
Expected Behavior
If I were to change the namespacing from /api/v1 to /api/v2 in .graphiticfg.yml, I would expect all of my newly generated files to be prefixed by /api/v2, not /api/v1
Solution
The API namespace is set upon initial use of the generator. If the install generator is not used, the ApplicationResource class will be created by the first use of the resource generator. After that, files will be created with the namespacing based on the endpoint_namespace attribute in the ApplicationResource class.
If .graphiticfg.yml is the source of truth, it seems like the ApplicationResource class should be updated when the namespace is changed.
Let me know if you want help, I'm willing to throw up a quick fix for this!
The text was updated successfully, but these errors were encountered:
th-ad
changed the title
File namespace incorrect after updating
Generated file namespacing incorrect after updating namespace
Sep 11, 2019
Issue
After updating the namespace key in the
.graphiticfg.yml
file and generating a resource, the old API namespacing is still applied to the generated files.Expected Behavior
If I were to change the namespacing from
/api/v1
to/api/v2
in.graphiticfg.yml
, I would expect all of my newly generated files to be prefixed by/api/v2
, not/api/v1
Solution
The API namespace is set upon initial use of the generator. If the install generator is not used, the
ApplicationResource
class will be created by the first use of the resource generator. After that, files will be created with the namespacing based on theendpoint_namespace
attribute in theApplicationResource
class.If
.graphiticfg.yml
is the source of truth, it seems like theApplicationResource
class should be updated when the namespace is changed.Let me know if you want help, I'm willing to throw up a quick fix for this!
The text was updated successfully, but these errors were encountered: