Uncaught TypeError: Cannot read property 'replace' of undefined

346 views
Skip to first unread message

Mohamed Rafik BRAHIM

unread,
Aug 9, 2015, 11:30:31 AM8/9/15
to Swagger
Hi everybody,

I am working on project right now: trying to link OrientDB and DreamFactory to an AngularJs app ( no Node.Js )
And I am facing some problems with the services call.

And since I am a new user of swagger, thought maybe you would help me guys.

As attachement the spec I wrote, and bellow the JavaScript code I wrote to call the api:

        window.swagger = new SwaggerClient({
          url: "/dsp/rest/api_docs/refmidAPI?app_name=REFPSO",
          success: function() {
            // upon connect, fetch a pet and set contents to element "mydata"
            swagger.apis.getAllClients( function(data) {
              console.log('success');
            });
          }
        });

Thank you.

spec.json

tony tam

unread,
Aug 10, 2015, 12:15:14 AM8/10/15
to Swagger
Hi, can you please share more about what the issue is that you are running into?

Mohamed Rafik BRAHIM

unread,
Aug 10, 2015, 5:52:40 AM8/10/15
to swagger-sw...@googlegroups.com
Hi,

the problem is I couldn't call the service 'getAllClients' ( actually couldn't call any service at all )
in my console I got this error : "Uncaught TypeError: Cannot read property 'replace' of undefined" catched by my clients.js

the thing is I do know if my spec is the problem or the implementation I am using.

Thank you.

--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/xfVTkcdu5hI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Cordialement;

--
Mohamed Rafik BRAHIM
follow me @raf_brahim
Cell 0033 6 64 54 36 30



Mohamed Rafik BRAHIM

unread,
Aug 11, 2015, 10:06:17 AM8/11/15
to swagger-sw...@googlegroups.com
Hi,

Here is a pic showing the error I got.
erreuuur swagger.png
Reply all
Reply to author
Forward
0 new messages