Skip to content

Add api_version option #145

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sideshowbandana
Copy link

Allow users to specify an api version when generating an api resource.

Allow users to specify an api version when generating an api resource.
@richmolj
Copy link
Contributor

richmolj commented Nov 5, 2018

Thanks @sideshowbandana, this is great! ❤️

A few things to consider: the 1.0 version of JSONAPI Suite is Graphiti (I'll be swapping over next week). That's where all active development is happening. I'm OK merging this, but we'd want the same in Graphiti.

Also, we have the concept of an "api namespace", which in Graphiti would mean foo_api/v1. This is saved to graphiticfg.yml so it can be re-used each time. It would be nice to ensure these concepts play nicely together - maybe pass the whole namespace?

@sideshowbandana
Copy link
Author

Cool. I'll check out Graphiti. Happy to take a pass at adding the functionality there as well. As far as the namespace stuff, would you like namespace to default to api/v1 and allow the user to specify --namespace /myapi/v2?

@richmolj
Copy link
Contributor

richmolj commented Nov 5, 2018

Yeah, that sounds about right. The behavior in Graphiti right now is that if there isn't already a namespace in the config, it will prompt you to enter one. What's missing is the command-line override.

Also keep in mind I believe this went from api/v1 to /api/v1 as the default in move to Graphiti.

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

Successfully merging this pull request may close these issues.

2 participants