Skip to content

Generated file namespacing incorrect after updating namespace #36

@th-ad

Description

@th-ad

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions