Skip to content

Vuejs generator #35

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

Merged
merged 41 commits into from
Sep 24, 2017
Merged

Vuejs generator #35

merged 41 commits into from
Sep 24, 2017

Conversation

alOneh
Copy link
Contributor

@alOneh alOneh commented Sep 21, 2017

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #26
License MIT
Doc PR

@alOneh alOneh changed the title Vuejs generator WIP: Vuejs generator Sep 21, 2017

const jsonLdMimeType = 'application/ld+json';

export default function {{{ lc }}}Fetch(url, options = {}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a fetch utility per resource? Can't this be common to every resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes of course !

@@ -0,0 +1,101 @@
import SubmissionError from '../../../error/SubmissionError';
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use utils/fetch directly, the fooFetch file is not necessary IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about that but keep this to allow wrapping... I have no preferences

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mysiar wdyt?

@mysiar
Copy link
Member

mysiar commented Sep 22, 2017

If we have just one common fetch for all endpoints there is no need to import it and give it new name

@alOneh alOneh changed the title WIP: Vuejs generator Vuejs generator Sep 22, 2017
@alOneh
Copy link
Contributor Author

alOneh commented Sep 22, 2017

I think it is ready if anyone can review

@@ -1,5 +1,5 @@
import SubmissionError from '../../../error/SubmissionError';
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
import {{{ lc }}}Fetch from '../../../utils/fetch';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to name Fetch function to the componenet ?

@@ -1,4 +1,4 @@
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
import {{{ lc }}}Fetch from '../../../utils/fetch';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to name Fetch function to the componenet ?

@@ -1,4 +1,4 @@
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
import {{{ lc }}}Fetch from '../../../utils/fetch';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to name Fetch function to the componenet ?

@@ -1,4 +1,4 @@
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
import {{{ lc }}}Fetch from '../../../utils/fetch';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to name Fetch function to the componenet ?

@@ -1,5 +1,5 @@
import SubmissionError from '../../../error/SubmissionError';
import {{{ lc }}}Fetch from '../../../api/{{{ lc }}}Fetch';
import {{{ lc }}}Fetch from '../../../utils/fetch';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to name Fetch function to the componenet ?

@mysiar
Copy link
Member

mysiar commented Sep 23, 2017

@soyuka please check this out

Copy link
Member

@soyuka soyuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

@mysiar mysiar merged commit 685520d into api-platform:master Sep 24, 2017
@dunglas
Copy link
Member

dunglas commented Sep 24, 2017

Awesome! Please don't forget to explain how to use it in the docs (https://github.com/api-platform/docs/tree/2.1/client-generator, IMO the Vue.js generator deserves its own dedicated file).

@mysiar
Copy link
Member

mysiar commented Sep 24, 2017

@alOneh could you please prepare doc file for Vue explaining how to connect generated files to app skeleton similar to https://api-platform.com/docs/client-generator/installation-and-usage ?

@alOneh
Copy link
Contributor Author

alOneh commented Sep 25, 2017

@dunglas @mysiar ok I will prepare this in this week

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.

4 participants