File tree Expand file tree Collapse file tree 6 files changed +228
-271
lines changed
Expand file tree Collapse file tree 6 files changed +228
-271
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ const entrypoint =
4848const outputDirectory =
4949 program . args [ 1 ] || process . env . API_PLATFORM_CLIENT_GENERATOR_OUTPUT ;
5050
51+ const entrypointWithSlash = entrypoint . endsWith ( "/" )
52+ ? entrypoint
53+ : entrypoint + "/" ;
54+
5155const generator = generators ( program . generator ) ( {
5256 hydraPrefix : program . hydraPrefix ,
5357 templateDirectory : program . templateDirectory
@@ -56,16 +60,16 @@ const resourceToGenerate = program.resource
5660 ? program . resource . toLowerCase ( )
5761 : null ;
5862
59- const parser = entrypoint => {
63+ const parser = entrypointWithSlash => {
6064 const parseDocumentation =
6165 "swagger" === program . format
6266 ? parseSwaggerDocumentation
6367 : parseHydraDocumentation ;
6468
65- return parseDocumentation ( entrypoint ) ;
69+ return parseDocumentation ( entrypointWithSlash ) ;
6670} ;
6771
68- parser ( entrypoint )
72+ parser ( entrypointWithSlash )
6973 . then ( ret => {
7074 ret . api . resources
7175 . filter ( ( { deprecated } ) => ! deprecated )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export function create(values) {
1717 return dispatch => {
1818 dispatch ( loading ( true ) ) ;
1919
20- return fetch ( '/ {{{name}}}' , { method : 'POST' , body : JSON . stringify ( values ) } )
20+ return fetch ( '{{{name}}}' , { method : 'POST' , body : JSON . stringify ( values ) } )
2121 . then ( response => {
2222 dispatch ( loading ( false ) ) ;
2323
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export function success(retrieved) {
1818 return { type : '{{{uc}}}_LIST_SUCCESS' , retrieved } ;
1919}
2020
21- export function list ( page = '/ {{{name}}}' ) {
21+ export function list ( page = '{{{name}}}' ) {
2222 return dispatch => {
2323 dispatch ( loading ( true ) ) ;
2424 dispatch ( error ( '' ) ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export const create = ({ commit }, values) => {
66 commit ( types . { { { uc } } } _CREATE_SET_ERROR , '' )
77 commit ( types . { { { uc } } } _CREATE_TOGGLE_LOADING )
88
9- return fetch ( '/ {{{name}}}' , { method : 'POST' , body : JSON . stringify ( values ) } )
9+ return fetch ( '{{{name}}}' , { method : 'POST' , body : JSON . stringify ( values ) } )
1010 . then ( ( response ) => {
1111 commit ( types . { { { uc } } } _CREATE_TOGGLE_LOADING )
1212
Original file line number Diff line number Diff line change 11import fetch from '../../../../utils/fetch'
22import * as types from './mutation_types'
33
4- const getItems = ( { commit } , page = '/ {{{name}}}' ) => {
4+ const getItems = ( { commit } , page = '{{{name}}}' ) => {
55 commit ( types . TOGGLE_LOADING )
66
77 fetch ( page )
You can’t perform that action at this time.
0 commit comments