Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated file namespacing incorrect after updating namespace #36

Open
th-ad opened this issue Sep 11, 2019 · 0 comments
Open

Generated file namespacing incorrect after updating namespace #36

th-ad opened this issue Sep 11, 2019 · 0 comments

Comments

@th-ad
Copy link

th-ad commented 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 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!

@th-ad th-ad changed the title File namespace incorrect after updating Generated file namespacing incorrect after updating namespace Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant